Skip to content
Products
AI Website Builder New VPS Hosting Cloud Servers Web Hosting Dedicated Servers Domains
Company
About Documentation Support Center Contact Get Started Call +91 75795 45488
Login
Hosting Panel — cPanel & Billing Console Panel — VPS Management
ALL SYSTEMS OPERATIONAL
WordPress

WooCommerce Coupon Not Working? Fix 'Invalid Coupon' Errors

Getwebup 6 min read

A customer types a coupon code at checkout, hits apply, and WooCommerce throws back "Coupon code isn't valid" or just does nothing. You check the coupon in wp-admin and it looks fine. This is one of the most common WooCommerce support tickets we see, and almost every case comes down to one of a handful of causes — most of which have nothing to do with the code itself.

Symptom: What customers actually see

The exact wording varies depending on WooCommerce version and what's blocking the coupon, but it usually falls into one of these buckets:

  • "Coupon code 'SAVE10' does not exist!"
  • "This coupon is not valid."
  • "Sorry, this coupon is not applicable to selected products."
  • "Coupon usage limit has been reached."
  • The field accepts the code but no discount appears in the cart totals.

You've probably already checked the obvious — the coupon exists in Marketing > Coupons and its status is Published. That's where most guides stop. Here's what to check next.

Cause 1: The coupon has restrictions the customer doesn't meet

Open the coupon and click the Usage restriction tab. Every field here is a hard gate — miss one and the coupon silently fails for that customer even though it's perfectly valid for someone else.

  • Minimum/maximum spend — cart total has to fall inside this range before tax and shipping are added.
  • Products / excluded products — if the coupon is restricted to specific products and the cart holds something else, it's rejected.
  • Exclude sale items — a very common one. If this box is checked and the customer's cart contains even one on-sale product, the whole coupon is refused.
  • Allowed emails — restricts the coupon to specific addresses or domains (e.g. *@company.com). A typo here quietly locks everyone out.

Cause 2: Usage limits and expiry

Check the General tab for Coupon expiry date and the Usage limits tab for:

  • usage_limit — total number of times the coupon can ever be used, across all customers.
  • usage_limit_per_user — how many times one logged-in customer (or one billing email for guests) can reuse it.
  • limit_usage_to_x_items — caps the discount to a set number of items in the cart, not the whole order.

If you ran a campaign last month and reused the same code, the usage limit from the old run is often still sitting there and quietly blocking new orders.

Cause 3: Caching is showing customers a stale cart or checkout page

This is the one that catches store owners off guard, because the coupon logic itself is fine — the cache is what's broken. If your cart or checkout page is served from a full-page cache (LiteSpeed Cache, WP Rocket, Cloudflare, or a CDN), customers can end up applying a coupon against a cached snapshot of the cart that doesn't reflect their actual session.

Symptoms that point to caching: the coupon works when you test it logged in as admin, works in an incognito window right after clearing cache, but fails intermittently for real shoppers, or the discount disappears after a page refresh.

WooCommerce ships with logic that should auto-exclude cart/checkout, but some caching plugins need it spelled out explicitly. In LiteSpeed Cache, go to LiteSpeed Cache > Cache > Excludes and confirm the cart, checkout, and my-account pages are listed. If you're on a VPS running Nginx with fastcgi_cache, add this to your server block:

set $skip_cache 0;
if ($request_uri ~* "/(cart|checkout|my-account)") {
    set $skip_cache 1;
}
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;

If you're behind Cloudflare, add a Page Rule (or Cache Rule) that sets Cache Level to Bypass for /checkout* and /cart*.

Cause 4: The customer copy-pasted the code with extra characters

WooCommerce coupon codes aren't case-sensitive by default, but they are picky about whitespace. A code copied from an email or SMS often carries a trailing space or a non-breaking space character, which fails silently. Ask the customer to retype the code manually instead of pasting it — it fixes a surprising number of "invalid coupon" tickets on its own.

Cause 5: A plugin conflict is intercepting coupon validation

Coupon plugins like Advanced Coupons, Smart Coupons, or custom code hooked into woocommerce_coupon_is_valid can override WooCommerce's own checks. If you recently installed or updated a coupon-related plugin and the problem started at the same time, that's your first suspect. Deactivate it temporarily and retest with a plain WooCommerce coupon.

Fix: A step-by-step check

  1. Enable WP_DEBUG and WP_DEBUG_LOG in wp-config.php and reproduce the issue — check wp-content/debug.log for fatal errors thrown during coupon apply.
  2. Open the coupon in wp-admin and review General, Usage Restriction, and Usage Limits tabs against the cart contents that failed.
  3. Clear both page cache and object cache (Redis/Memcached), then exclude cart/checkout/my-account from the cache going forward.
  4. Test in an incognito window with a fresh cart, no plugins beyond WooCommerce active, using a default theme like Storefront.
  5. If it works in that clean test, reactivate plugins one at a time until the coupon breaks again — that's your conflict.
  6. Check WooCommerce > Settings > General and confirm "Enable the use of coupon codes" is actually checked — it gets unchecked more often than you'd expect during theme or plugin migrations.

Debugging with a filter

If the built-in error messages aren't specific enough, temporarily add this to a site-specific plugin (not your theme's functions.php, so it survives a theme switch) to see the raw error code WooCommerce is throwing:

add_filter( 'woocommerce_coupon_error', function( $err, $err_code, $coupon ) {
    error_log( 'Coupon error code: ' . $err_code . ' for coupon: ' . $coupon->get_code() );
    return $err;
}, 10, 3 );

Match the logged error code against WooCommerce's WC_Coupon::E_WC_COUPON_* constants to know exactly which restriction fired.

Common error messages and what they mean

MessageLikely cause
Coupon code does not existTypo, extra whitespace, or coupon not published
This coupon has expiredExpiry date has passed
Coupon usage limit has been reachedTotal or per-user usage limit hit
Sorry, this coupon is not applicable to selected productsProduct/category restriction or excluded sale items
The minimum spend for this coupon is ₹XCart subtotal below the minimum spend field
Coupon applied, but no discount visibleCached checkout totals not recalculated

Prevention

  • Give every campaign its own unique coupon code instead of reusing old ones — old usage limits and expiry dates won't come back to bite you.
  • Set a sensible expiry date on every coupon so stale codes stop working on their own instead of lingering for years.
  • Always test a new coupon end-to-end in an incognito window before announcing it, not just inside wp-admin.
  • Keep cart, checkout, and my-account permanently excluded from page caching — this prevents a whole category of "works for me, not for the customer" tickets.
  • Document which plugins touch coupon logic on your store, so a future conflict is faster to isolate.

Frequently asked questions

Why does WooCommerce say a coupon code isn't valid even though it exists in wp-admin?

Usually a restriction the customer's cart doesn't meet - minimum spend, excluded sale items, a product/category limit, or the coupon's usage limit already being reached. Check the coupon's Usage Restriction and Usage Limits tabs against the exact cart that failed.

Can a customer use two coupons at the same time in WooCommerce?

Only if neither coupon has 'Individual use only' checked on its General tab. If either one has that box ticked, applying a second coupon removes the first automatically.

Why does my coupon work when I test it as admin but fail for real customers?

This almost always points to page or object caching serving a stale cart/checkout page to logged-out visitors. Exclude cart, checkout, and my-account from your caching plugin or CDN rules.

How do I see how many times a coupon has already been used?

Open the coupon in Marketing > Coupons and check the 'Usage / Limit' column, or open the coupon and look at the Usage Limits tab for the current count against the limit you set.

Does a trailing space in a copy-pasted coupon code really break it?

Yes. WooCommerce trims most whitespace but codes copied from emails or SMS can carry invisible characters that cause a false code-not-found error. Ask the customer to type the code manually as a first troubleshooting step.

#woocommerce #coupon-code #discount #checkout #wordpress #caching

Keep reading

Chat with Support