How to Block All Discount Codes on Shopify During a Sale
By Viktoriia Pavlova · · 6 min read
Quick answer
Shopify has no single switch to turn off every discount code during a sale. DCB adds one: choose “Block all discount codes”, optionally schedule a start and end time, and add a custom error message customers see at checkout.
Why you need to block discount codes during a sale
When you run a sitewide sale, every active code — welcome offers, influencer codes, loyalty rewards, old codes leaked to coupon sites — still works. Customers combine them with your sale price and your margin disappears. On a 30% sale, a stacked 15% code means you're really giving away more than 40%.
What Shopify lets you do natively
In Shopify admin you can deactivate codes one by one, or set end dates. That works if you have five codes. It doesn't work when you have hundreds of influencer, affiliate and loyalty codes created by different apps — and you'll need to switch them all back on after the sale.
- Manually expiring codes is slow and error-prone
- Codes created by loyalty apps (Smile.io, LoyaltyLion, Yotpo) are easy to miss
- Reactivating everything afterwards is just as much work
How to block all discount codes with DCB
- Install DCB from the Shopify App Store.
- Under Discount code settings, choose Block all discount codes.
- Optionally choose whether to also block automatic discounts.
- Turn on Schedule discount blocking and set the start and end date of your sale.
- Write a custom error message, e.g. “Discount codes can't be combined with our sale prices.”
Your existing codes stay untouched. When the schedule ends, they work again automatically.
Keep some codes working
Running a VIP or staff code you still want to honor? DCB lets you allow selected discount codes, so only those codes pass while everything else is blocked.
Want this done in two clicks? Install DCB – Discount Code Blocker and start your 3-day free trial.
Good to know
If a restricted product is in the cart, the code won't apply to the whole order. This is due to how Shopify's discount APIs work. DCB lets you show a clear, translated error message so customers understand why.
Frequently asked questions
- Can I turn off all discount codes on Shopify at once?
- Not natively. Shopify requires deactivating codes individually. DCB blocks all codes with one setting and restores them when you switch it off or when the schedule ends.
- Will blocking delete my discount codes?
- No. DCB doesn't delete or edit your codes — it only stops them from applying while blocking is active.
- Can I schedule discount blocking for Black Friday?
- Yes. Set a start and end date and time, and DCB blocks codes only during that window.
Block discount codes the easy way
Sale items, tags, selected products or everything — scheduled. 3-day free trial.
Install DCB