Table of Contents
Problem Description #
When a user visits a coupon URL the coupon does not get applied to the cart. The user sees the page load but the discount is not present and no message indicates the coupon was applied.
Common symptoms #
- Visiting a coupon URL shows no change in cart totals.
- No “Coupon applied” notice appears.
- Coupon appears in the cookie (in some cases) but not applied on cart/checkout.
Typical cause #
This most commonly happens because the site is using a page caching mechanism, cookies weren’t set (or were blocked), the URL parameter key is incorrect, or another plugin/theme is interfering with how the plugin applies the coupon.
Solution-step-by-step #
- Confirm correct URL format and coupon code
- Verify the exact URL format the plugin expects. Example formats used by similar plugins:
- https://example.com/?alg_apply_coupon=COUPONCODE
- or https://example.com/?coupon=COUPONCODE
(Check your plugin settings for the exact parameter key and example URL). WordPress.org+1
- https://example.com/?alg_apply_coupon=COUPONCODE
- Confirm coupon code exists in WooCommerce > Marketing (or Coupons) and that it’s active and valid (dates, usage limits, product restrictions).
- Verify the exact URL format the plugin expects. Example formats used by similar plugins:
- Test in a fresh browser session
- Open an incognito/private window and visit the coupon URL to rule out browser cache/cookies interfering.
- If it works in incognito but not in normal browsing, ask user to clear cookies and retry.
- Open an incognito/private window and visit the coupon URL to rule out browser cache/cookies interfering.
- Check caching
- If you use a full-page cache (server cache, CDN, or plugins like WP Rocket, Cloudflare, etc.), exclude the cart, checkout, and any page where the coupon should be applied from caching.
- Purge cache after adjusting exclusions.
- Some plugins require the coupon URL page NOT be cached because the plugin sets a cookie or modifies the session when the URL is visited. Confirm this behavior in your plugin docs. WPFactory+1
- If you use a full-page cache (server cache, CDN, or plugins like WP Rocket, Cloudflare, etc.), exclude the cart, checkout, and any page where the coupon should be applied from caching.
- Confirm cookie/session is being set
- Visit the coupon URL, then check browser dev tools → Application (Cookies) to see if the plugin sets a cookie (cookie name varies by plugin).
- If no cookie is set, check for server-side security modules (e.g., strict SameSite cookie settings) or headers that might block cookies.
- Visit the coupon URL, then check browser dev tools → Application (Cookies) to see if the plugin sets a cookie (cookie name varies by plugin).
- Rule out plugin/theme conflicts
- Temporarily switch to a default theme (e.g., Storefront) and disable all plugins except WooCommerce and the coupon plugin.
- Try the coupon link again. If it works, re-enable plugins one-by-one to find the conflict. This is a standard conflict-debugging approach. WordPress.org
- Temporarily switch to a default theme (e.g., Storefront) and disable all plugins except WooCommerce and the coupon plugin.
- Check plugin settings
- In plugin settings, confirm the “apply via URL” key (parameter) matches the URL you’re sharing.
- If plugin has an “empty cart before applying” option, confirm whether you want it on, this can affect whether coupons apply as expected (see Article on “Empty cart” behavior below). WPFactory
- In plugin settings, confirm the “apply via URL” key (parameter) matches the URL you’re sharing.
- Enable debug if needed
- Turn on WP_DEBUG and the plugin’s logging (if it has one) and retry the URL to capture useful error messages in debug.log.
- Turn on WP_DEBUG and the plugin’s logging (if it has one) and retry the URL to capture useful error messages in debug.log.
Prerequisites #
- Plugin version up-to-date (use latest stable release).
- WooCommerce supported version.
- No CDN or cache blocking cookie setting or URL parameter.
Additional notes / prevention tips #
- Document and publish the exact URL format in your KB.
- Add cache exclusions for all coupon URL patterns and cart/checkout pages.
- When sending marketing emails, use the documented plugin URL format.
