Skip to main content
WooCommerce

Troubleshooting

Solutions to the most common issues with the Aldersverificering WooCommerce plugin.

Customer is stuck in a cart redirect loop

Symptom: The customer goes to checkout and is immediately sent back to the cart. Retrying has no effect.

Cause: The plugin is enabled but no API key is saved. Without a key, all verification attempts fail immediately.

Fix: Go to WooCommerce → Settings → Aldersverificering. If the status strip reads "Inactive — no API key configured", enter your API key in the Test Public Key or Production Public Key field and save.

See API Keys to create a key.


The verification popup is blocked by the browser

Symptom: Clicking Confirm with MitID (Bekræft med MitID in Danish) does nothing, or a popup-blocked notification appears in the browser toolbar.

Cause: The customer's browser is blocking popups for your domain.

Fix: Change Verification Mode to Full-page redirect in Configuration. This replaces the popup with a full-page navigation to MitID, which is never blocked by popup blockers.


Verification passes but checkout is still blocked

Symptom: The customer completes the MitID flow successfully but sees an age verification error when they return to checkout.

Cause: The plugin is set to Production mode but only a test key (pk_test_) is saved. The server validates the JWT against the live JWKS endpoint, but the token was issued by the test endpoint — the signature check fails.

Fix: The environment and key must match:

ModeKey required
Test modepk_test_
Production modepk_live_

Never use a test key while Production mode is active. See Going Live for the correct sequence.


Age gate is not showing for some products

Symptom: Some products go through checkout without triggering age verification.

Cause: Scope is set to Selected products & categories, and those products are not marked as requiring verification.

Fix: Choose one of:

  • Switch Scope to All products to gate every product in the store
  • Open each product's edit screen and tick Require age verification to purchase this product
  • On the settings page, tick the relevant categories in the category grid

See Products & Categories.


Foreign delivery still asks for MitID

Check: Plugin version 1.2.0 or later is installed, and Allow delivery outside Denmark without MitID is enabled and saved.

The rule uses the final shipping country, not the customer's nationality, IP address, or billing country alone. Local pickup, age-restricted virtual products, unsupported countries, and missing delivery details still require verification. Clicking Delivery outside Denmark only opens checkout; it does not grant an exemption.

If the customer chooses Danish delivery, ask them to return to the cart, complete verification, and try again. For custom checkout or express-payment integrations, confirm that they submit the shipping details and use WooCommerce's standard server hooks. See Delivery outside Denmark.


Customers can enter checkout before verifying

With Allow delivery outside Denmark without MitID enabled, this is expected: customers need access to checkout to enter their delivery address. The plugin checks the final order before payment and rejects an unverified order when verification is required.

To restore verification before checkout, disable the foreign-delivery option and save. Keep the main age-verification toggle enabled.


Payment retry requires verification again

For orders processed under the foreign-delivery setting, a successful verification is recorded against the order's age requirement and active public key. A retry can use that record after the browser token expires only while it still satisfies the order's requirement and the key is unchanged.

An order previously allowed through for foreign delivery has no verification record. If its destination changes to Denmark, verification is required. Return to the cart and complete verification before retrying. See Payment retries and order records.


The settings page looks unstyled

Symptom: The Aldersverificering settings tab shows plain HTML — no cards, no styled toggle, no layout.

Cause: The browser cached the admin stylesheet before the latest version was loaded.

Fix: Hard-refresh the page with Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows/Linux). If the issue persists, open the page in a private/incognito window or clear your browser cache.


Production verifications are rejected (domain error)

Symptom: Customers see an error during the MitID flow, verifications fail silently, or the account event log shows 403 or "domain not allowed" errors.

Cause: Your live domain is not on the whitelist in your account.

Fix:

  1. Go to Account → Domains
  2. Add your domain — no https://, no trailing slash (e.g. myshop.dk)

See Domains for exact format requirements.

On this page