Shopify Scripts retired on June 30, 2026. The Script Editor is closed, and any code you ran there stopped running the same day. That includes the automatic discounts a lot of stores quietly leaned on for years.
Here is the part that catches people out: nothing announces it to your shoppers. A tiered discount that used to knock 15% off at $150 just does not fire anymore. The cart looks normal, the order goes through at full price, and the first sign of trouble is a support ticket or a dip in conversion you cannot immediately explain.
Discounts are also the easiest thing you had in Scripts to rebuild, and the new version is faster and works on more plans. So if you are cleaning up after the cutover, start here. This is the fast path to getting your discounts applying again.
What "Scripts are gone" actually means for your discounts
Scripts ran server-side at checkout. A discount Script read the cart and the customer, decided on a discount, and returned it. Common shapes:
- A tiered discount based on cart total, spend more to save more.
- An automatic percentage or fixed amount by cart value.
- A reward for returning customers based on their order count.
- A free gift added during a promotion.
All of that logic lived in the Script Editor, and all of it stopped on June 30. There is no partial mode and no read-only fallback. The rule is simply not evaluated, so the discount is not applied.
If you are not sure whether a Script was doing this work for you, walk through how to tell if your store uses Shopify Scripts before you change anything. It takes a couple of minutes and tells you exactly what broke.
The replacement: discount Functions
Shopify's answer is Shopify Functions, and for discounts specifically, a discount Function. It is a small app extension you build with the Shopify CLI in JavaScript or Rust. It declares the cart and customer fields it needs in a GraphQL input query, runs a run function that returns discount operations, and attaches to an automatic discount or a discount code in the admin.
The mental model barely changes from Scripts. You still look at the cart, decide a discount, and return it. What changes is that Functions run inside Shopify's checkout the same way for every buyer, they are faster, and they are not limited to Shopify Plus. The last point matters: plenty of stores that could never use the old Scripts on their plan can use discount Functions today.
How to replace your discount Scripts
The move is the same five beats every time:
- Create a custom app for your store, or extend one you already have.
- Generate a discount function with the Shopify CLI (
shopify app generate extension). - Request only the inputs you need in the input query. Do not pull the whole cart if you only read the total.
- Port your old rule into
run, keeping the same threshold and the same customer-facing message. - Deploy, then attach an automatic discount (or a code) to the function in the admin.
That is the shape for a straightforward tiered or cart-value discount, and it is genuinely a same-day job. The full walkthrough, with the input query and the run logic side by side with an old Script, is in replacing Shopify discount Scripts with Functions.
Two honest notes before you start. Free gifts are the one discount pattern that does not carry over cleanly, because the Script trick of rewriting a line price does not exist in Functions. You combine a discount function with a separate step that adds the gift to the cart, so plan that flow rather than assuming it maps one to one. And if you would rather not touch the CLI at all, a discount app can provide the function for you; the trade is flexibility for speed.
Get discounts back first, then the rest
Discounts are the right first migration because they are the simplest and because a broken discount is the most visible thing a shopper hits. Once your discounts apply again, work through the rest of what Scripts used to do: shipping rules move to delivery Functions, and the whole picture across discounts, shipping, and payments is laid out in the Scripts to Functions migration guide.
Every day a discount Script stays dead is a promotion that is not running and a checkout that is quietly charging full price. The rebuild is smaller than the deadline made it feel. Start with one discount, get it live, and the rest follow the same path.
If you want the discount work done properly and fast, that is what we do.

Comments
Every comment here comes from a verified email. Write yours, confirm from your inbox, and it's live.
Loading comments…