WooCommerce Integration
Checkout protection for age-restricted products
WooCommerce Integration
When WooCommerce is installed, the AgeOnce plugin automatically protects checkout for products that require age verification.
How it works
- You mark products that require verification (see below)
- When such a product is in the cart, the checkout page shows the verification gate
- User must complete AgeOnce verification before placing the order
- After successful verification, the order can be completed
Marking products for verification
Method 1: Per-product checkbox
- Edit the product in WooCommerce
- In Product Data → General, find Age Verification Required
- Check the box
- Save
Method 2: Product categories (Content Rules)
- Go to AgeOnce → Content Rules
- Enable Products
- Select Active Age Groups (e.g. 18+)
- In 18+ Rules, select Product Categories (e.g. Alcohol, Tobacco)
- All products in those categories will require verification
Method 3: Both
Products can be restricted by category and/or individually. The highest required age applies.
Checkout behavior
Before verification
When the cart contains age-restricted products:
- Verification gate appears above the Place Order button
- "Verify Age" button redirects to AgeOnce
- Place Order remains available (order will be blocked if verification is not completed)
After verification
- Success message: "Age verified. You can proceed."
- User can place the order
- Result is stored in session — no need to verify again for subsequent orders in the same session
Callback URL
The plugin uses this Redirect URI for checkout verification:
https://yoursite.com/?ageonce_callback=1Add it to Dashboard Settings → Redirect URIs. The plugin shows the exact URL to copy in AgeOnce → Settings.
Transaction ID and audit
After a successful verification at checkout, the plugin saves the Transaction ID (Audit ID) to the order as order meta. In the WordPress admin:
- Open the order and check the AgeOnce metabox in the sidebar
- You will see Tx ID and Verified At for verified orders
You can store this Transaction ID (e.g. in your order or CRM) and later look up the verification in the Dashboard Audit Logs: search by this ID to see when and how the verification was completed. This helps with compliance and support.
Compatibility
Tested with WooCommerce 5.0+ and common themes (Storefront, Astra, etc.). If you use custom checkout or checkout-modifying plugins, test on a staging site first.