Article···5 min read

Discount Code Not Working? 9 Causes and the Fix That Removes Them

"This code is not valid" costs more sales than almost any other message. The nine settings behind most failing codes on Shopify and WooCommerce, a five-minute test, and the fix that removes the problem.

Discount Code Not Working? 9 Causes and the Fix That Removes Them

"This code is not valid." Few messages cost a shop more. The buyer wanted the product, accepted the price and typed the code you sent. Now the shop tells them they were wrong. Some try again, some search for another code, many simply leave.

The good news: almost every failing code has one of a handful of causes, and all of them sit in your discount settings. This guide goes through them for Shopify and WooCommerce, and ends with the one fix that removes the problem entirely.

Why buyers react so strongly

A failed code is not a neutral error. The buyer did everything right from their point of view: signed up, waited for the email, copied the code. A rejection at that moment feels like a broken promise. It also comes at the worst possible place, right before payment, where most purchases are lost anyway.

The nine most common causes

1. The code has expired or has not started yet

Start and end dates are the most frequent culprit, especially with time zones. A code that "ends on Sunday" may end at midnight in the shop's time zone, not the buyer's. Check the exact start and end time, and avoid ending a code on the same day you announce it.

2. The usage limit is reached

Both platforms let you cap total uses or uses per customer. A newsletter code limited to 100 uses stops working for the 101st subscriber, who received the same email as everyone else.

3. "Once per customer" with a different email

A per-customer limit is tied to an email address or account. A buyer who used the code once, or who checks out with a different address than the one they signed up with, may be rejected.

4. Minimum order value not met

"10 % off from €50" fails at €49.90. If you use minimums, say so in the same sentence as the code, and show the remaining amount in the cart.

5. The product is excluded

Codes limited to certain products or collections fail for everything else. On WooCommerce, the option "Exclude sale items" makes a code fail on every product that is already reduced, which is exactly where buyers expect it to work during a sale.

6. It does not combine with another discount

If an automatic discount or another code is already active, a second code is often rejected or silently replaces the first. On Shopify each discount defines which other discount types it may combine with. On WooCommerce "Individual use only" blocks any other coupon.

7. Customer or market restrictions

Codes can be limited to specific customers, customer segments, email addresses or, on Shopify, specific markets. A buyer outside that group gets the same generic error.

8. Typos and invisible characters

Codes are not case sensitive on either platform, but a trailing space, a zero instead of an "O" or a code copied from a styled email can still fail. Avoid ambiguous characters such as O, 0, I and 1 in codes you send by email.

9. Coupons are switched off

On WooCommerce the setting "Enable the use of coupon codes" under WooCommerce → Settings → General must be on. Some themes and checkout plugins also hide or replace the coupon field.

A five-minute check before every campaign

  1. Open the shop in a private window, on a phone, as a new customer.
  2. Add the exact product you are promoting, at the quantity a typical buyer would choose.
  3. Apply the code exactly as it appears in your email or post.
  4. Check the total, including shipping, against what the campaign promises.
  5. Repeat as a logged-in returning customer, and once with a product that is already on sale.

If any step fails, fix the setting before the email goes out, not after the first complaints arrive.

Write error messages that help

When a code does fail, "invalid code" is the least useful answer. Where your platform or checkout app allows it, tell the buyer why: "This code applies from €50, you are €3.10 away" keeps them in the checkout. "This code has expired" at least ends the search.

The fix that removes the problem

Every cause above has one thing in common: the buyer has to enter a code. If the discount arrives through a link instead, the product lands in the cart with the price already reduced, and there is nothing to mistype, look up or reject. Shopify supports this natively, WooCommerce with an extension. The step-by-step setup is in our guide Discount link instead of discount code.

This is also how Heartly runs flash sales: a tap on "Go to checkout" opens your shop with the product in the cart and the discount applied, on Shopify through a cart Heartly creates with the discount attached, on WooCommerce through the Heartly plugin.

Frequently Asked Questions

Are discount codes case sensitive?

No. Shopify and WooCommerce both accept codes regardless of upper or lower case. Spaces and look-alike characters such as O and 0 can still cause a code to fail.

Why does my code not work on sale items in WooCommerce?

The coupon probably has "Exclude sale items" enabled under Usage restriction. With that option, the coupon does not apply to any product that already has a sale price.

Why can't buyers combine two discounts on Shopify?

Each Shopify discount defines which other discount types it can combine with. If combinations are not enabled for both discounts, only one of them applies.

How do I test a discount code before sending it?

Use a private browser window on a phone, add the promoted product and apply the code exactly as written in your campaign. Repeat as a returning customer and with a product that is already reduced.

Can I give a discount without a code?

Yes. A discount link applies the discount automatically when the buyer opens it. Shopify supports discount links out of the box; WooCommerce needs an extension or a plugin such as Heartly's.

Enjoyed this article? Share it.

Next step

Plan your next flash sale.

Choose products, set a deadline, and share a dedicated sale page. Checkout stays in your store.

Install on Shopify→