Skip to content

Shopify tutorials for the person running the store. Orders, discounts, fulfilment, returns.

Deactivate a discount code early in Shopify

A discount that was meant to run all winter can be switched off the day it stops paying for itself, without deleting it and without touching the orders it already served. This tutorial deactivates WINTER20, a code for 20% off orders that was scheduled from 1 November to 31 December 2026. By 13 November it had been used 137 times. At an average discounted order of $80.00, each use gave away $16.00, so the code had given away $2,192.00 in under two weeks. Deactivating it on 13 November ends it 48 days early. If the dates themselves are the problem rather than the offer, the guide to scheduling discount start and end dates covers changing them instead.

Written November 13, 2026 · Shopify admin, desktop steps · 5 minutes read

The worked example

CodeWINTER20
Value20% off the order
Scheduled1 November to 31 December 2026
Uses by 13 November137
Average discounted order$80.00
Given away per use$16.00
Given away so far$2,192.00
Deactivated13 November 2026, 48 days early

Download the deactivation log: deactivation-log.csv (213 bytes).

The WINTER20 row from this tutorial plus two example rows, each with its scheduled end, the day it was switched off, and the days cut short. Keep one row per code you end early.

1Read the status and the uses first

From your Shopify admin, go to Discounts and use the Status filter to read the list. Find the code and read its status and its use count before you change anything. WINTER20 shows as active with 137 uses. The use count is the number you will do the cost arithmetic on, and it is also your record afterwards: deactivating keeps the history on the discount, so write the count down if you keep your own log.

2Open the discount

Click the discount's name on the Discounts page to open it. Read the dates and the value once more on the discount itself, not from memory: the code you are about to switch off should be the code whose numbers you just added up.

3Click Deactivate, then confirm

Click Deactivate, which sits under the discount's name. A confirmation follows; click Deactivate again to confirm. The discount's status changes and the code stops working at checkout from that moment. Orders already placed keep the discount they were placed with.

4Test the code at checkout

Put any product in a cart, go to checkout, and enter the code. A customer applying a deactivated code gets the error Unable to find a valid discount matching the code entered. Seeing that message on your own test cart is the sign the code is off for customers too. Stop the test before payment.

5Deactivate several codes at once

To end a whole promotion at once, check the boxes beside the discounts on the Discounts page, click Deactivate discounts, and confirm. Every code in the selection stops at the same moment, so read the selection before confirming: one box ticked by mistake ends a code you meant to keep.

6Bring an expired code back when you need it

Deactivation is not the end of a code. To restart one that has expired, click the expired discount, click Activate, and confirm. Its status becomes Active with no set end date, so it runs until you stop it. If it needs an end date, edit the discount afterwards and set one.

7Delete only a code that should never return

Deleting is the permanent version of the same job. On the Discounts page, select the discount, open the menu, click Delete discounts, and confirm. The discount leaves the list for good. A code you might run again next season belongs in the deactivated state, not deleted.

The arithmetic

What WINTER20 had cost by the day it was switched off, and how much of its run was left.

FigureAmount
Average discounted order$80.00
Discount per use, 20% of $80.00$16.00
Uses by 13 November137
Given away, 137 × $16.00$2,192.00
Days of the run left, 31 December − 13 November48

$80.00 × 20% = $16.00 given away on an average order. Across 137 uses that is 137 × $16.00 = $2,192.00. The scheduled end was 31 December 2026 and the code was deactivated on 13 November 2026, which is 48 days before the end date: the last 48 days of the run never happen.

Held at the counter

Switching a code off and on does not reset its usage history. Deactivating, reactivating, or renaming a code leaves its usage history as it stands: a customer who used the code before still counts as having used it. A one-per-customer code brought back for a second run does not give past customers a second use.

A deactivated code sitting on a draft order blocks that order. When a code on an open draft order is deactivated, neither you nor the customer can complete that order until the code is removed from the draft, through Edit discount on the draft. The guide to adding a discount to a draft order covers editing the discount on the draft itself.

Promoted links and QR codes stop with the code. Shareable links and QR codes work only for active discounts. A link posted for the code stops applying the discount the moment the code is deactivated, even though the page it points to still loads.

Sources

  • Managing and editing your discounts — Shopify's help pages: deactivating and reactivating a discount, deactivating several at once, and deleting discounts.
  • Discount codes FAQ — Shopify's help pages: the error a customer sees for a deactivated code, and that usage history survives deactivation and renaming.
  • Adding discounts to draft orders — Shopify's help pages: a deactivated code on an open draft order blocks the order until the code is removed.