Shopify Scripts to Functions migration
Shopify Scripts stopped running on 30 June 2026. If your "buy two, save 10%" quietly stopped applying this summer, or shipping rates jumped back to full price, that's why. I rebuild each Script as a Shopify Function, test it against your real carts, and switch it on before customers notice anything else.
Trusted by 230+ brands, including











On 30 June 2026 Shopify switched Scripts off for good. Editing had already stopped in April. Anything still running as a Script stopped applying that day, which in practice means discount codes that quietly don't work, shipping rates back at full price, and payment methods showing where they shouldn't.
The stores I see now fall into two groups. Some migrated in a hurry and have Functions that mostly work, with stacking rules nobody checked. Others didn't notice until a customer emailed about a code that wouldn't apply. The fix is the same for both: find what each Script used to do, and rebuild it properly.
What Scripts did and what replaces them
There were three kinds of Script, and each maps to a different Function type.
Line item Scripts handled product and order discounts: buy one get one, percentage off a collection, tiered spend thresholds, customer-tag pricing. These become discount Functions. Shopify has brought product, order and shipping discounts into a single discount Function API, which is a genuine improvement on maintaining three.
Shipping Scripts renamed, reordered and hid delivery options. These become delivery customisation Functions. The usual jobs are hiding express shipping for heavy or restricted items, renaming methods to something a customer understands, and putting the sensible default first.
Payment Scripts hid or reordered payment methods. These become payment customisation Functions. Hiding cash on delivery above an order value, or hiding a method in one market, are the common cases.
Cart Transform has no Script equivalent, and it's the interesting one. It changes what's in the cart before checkout: expanding a bundle SKU into its components so stock draws down correctly, merging component lines into one bundle line, or updating a line's price. Brands that faked bundles with a hidden product and a lot of Liquid can now do it properly.
What actually changes
The logic is usually the smallest part of the job.
Scripts were a text field in the Shopify admin. You wrote Ruby, saved, and it ran. Functions are written in Rust or JavaScript, compiled, deployed through the Shopify CLI as part of an app, and versioned. That means a repository, a deployment step and an app that has to stay installed. For a brand with no development process, that's the real change.
Functions also run under limits Scripts never had. There's an instruction budget and an input size cap, and the input is a query you define, so the Function only sees the parts of the cart it asks for. A Script that looped over every line item and every variant metafield needs restructuring. It's a good discipline: the query has to state exactly what the logic depends on.
Discount Functions run through Shopify's discount system, so they interact with discount codes and automatic discounts in ways Scripts didn't. Which discounts can stack with which is now a setting, so any stacking a Script handled implicitly has to be made explicit.
What usually goes wrong
Three things, on almost every store I look at.
Discount stacking. Scripts applied in sequence and the last one won. Functions combine according to rules you set. Brands running several overlapping promotions find the behaviour changes unless the combination rules are set to match.
Currency and markets. Functions receive the customer's currency, and logic written against the shop's currency gives wrong answers in every market but the home one. If you sell internationally, this needs testing market by market.
Testing. Scripts could be tested in the admin against a live cart. Functions need a development store, seeded carts and a deliberate test matrix. Budget for it.
Where I've done this
Miller Harris, the London fragrance house, runs gift-with-purchase campaigns through the cart. I build the Functions behind them: a free gift picker that checks stock, keeps prices right and stays steady while the cart updates. Sales are up 12% since the new gifting flow went in.
How long it takes
A store with two or three straightforward discount Scripts takes about two weeks. One with tiered B2B pricing, customer-tag logic, bundles and market-specific rules takes about four. What moves it is how much of the old logic Functions now do natively, and how much needs redesigning.
Not sure what's still broken? The Shopify Plus audit checks every discount, shipping and payment rule at checkout, along with the rest of the store, and tells you what to fix first.
“I'd never go back to working with a large agency after working with Graftstudio”
Niamh RussellSteamline LuggageLuxury luggage used by Margot Robbie and Reese WitherspoonHow it works
The work, step by step.
- 01
Find what stopped
Every Script that was running before June, what it did, and what's happened to it since. A surprising number were running promotions that ended years ago. Those can simply go.
- 02
Map to Function types
Each Script assigned to a discount, delivery or payment customisation Function, with the bundle cases that need Cart Transform picked out separately. This is where stacking and combination rules get decided.
- 03
Build and test
Functions written, deployed to a development store and tested against a matrix of carts covering each rule, each market and the way they interact.
- 04
Switch on and watch
Functions enabled one at a time, with live carts watched. Discounts are the first thing customers notice, so I do this deliberately, and never at the end of a Friday.
Related work
Recent work

Miller Harris
A gifting flow that keeps the cart right in every country
- Sales, new gifting
- +12%
- Working together
- Since 2023

SteamLine Luggage
Hundreds of luggage combinations, made easy to shop
- Products, one range
- 200
- Brief to launch
- 10 weeks

Brew Tea Co
Subscriptions, rewards and accounts rebuilt to work as one
- Net sales, year one
- +28%
- Avg order value
- +16%
Insights
