Testing
Test the age verification flow end-to-end before going live.
Testing
Before switching to production, test the full verification flow using the MitID test environment. Test verifications are always free and never appear in billing.
Prerequisites
- Plugin installed and active
- A
pk_test_key saved in the Test Public Key field — get one at Account → API Keys - Environment set to Test mode
- Your domain (including any staging or local domain you are testing from) whitelisted at Account → Domains
- At least one age-gated product in your store — see Products & Categories
Step-by-step
- Add one or more age-gated products to your cart
- Go to the checkout page
- The age verification popup (or redirect) appears
- Complete the verification using the MitID test tool (see below)
- Once verified, the checkout continues normally
- Place the order — it should succeed with no age verification error
If the popup does not appear, check that the plugin is enabled and the product is gated. See Troubleshooting.
The MitID test tool
The MitID test environment lets you simulate a real verification using a test identity with any birthdate you choose. No real phone is needed — the test tool has a built-in app simulator.
See MitID Test Tool for a full step-by-step walkthrough.
What happens after verification
Successful verification — A cookie is set in the customer's browser containing the signed JWT. The checkout proceeds and the order can be placed. The cookie is valid until the browser tab is closed or the JWT expires (typically 30 minutes).
Failed or cancelled verification — The customer is redirected back to the cart with a notice asking them to complete age verification before proceeding. They can try again from the cart page.
The TEST MODE banner
When the plugin runs in test mode, a yellow TEST MODE banner is visible on the checkout and cart pages. This is intentional — it signals to you and your team that real verifications are not running. The banner disappears when you switch to Production mode and save.
Staging and production environments
Most WooCommerce shops run a staging site alongside the live store. The plugin supports this pattern cleanly because each WordPress install has its own database and its own settings:
| Staging | Production | |
|---|---|---|
| WordPress install | Separate (own database) | Live site |
| Environment setting | Test mode | Production mode |
| API key | pk_test_... | pk_live_... |
| Domain whitelisted | staging.myshop.dk | myshop.dk |
Because the two installs share no settings, switching to production on the live site has no effect on staging — and vice versa. You can keep staging in test mode permanently as a safe environment for development and QA.
Remember to whitelist your staging domain at Account → Domains. Domain whitelisting is enforced for both test and production keys.
Next step
Once you have a successful end-to-end test, you are ready to go live.