Shopify Scripts are gone: rebuilding custom rules with Functions
Short answer: Shopify retired Scripts and the Script Editor on June 30, 2026, and scripts no longer run on any store. Custom logic that used them, such as tiered discounts, hiding a shipping method for certain products or blocking a payment method for some orders, now needs to come from Shopify Functions, delivered through an app. Many common rules can be rebuilt with native discount settings or an App Store app that uses functions; truly custom logic needs a custom app, which on Shopify's current terms requires a Shopify Plus plan. List what your old scripts did, check what's already broken, and rebuild each rule with the simplest option.
What changed
Shopify Scripts were small Ruby programs that ran in checkout to change line item prices, shipping rates and payment options. Shopify's Help Center now states that Scripts and the Script Editor app were retired on June 30, 2026 and that scripts no longer run on any store. Instead, merchants customise discounts, shipping and delivery options, and payment methods with apps that provide functions.
If your store relied on scripts and nobody replaced them, some promotions, shipping restrictions or payment rules have quietly stopped applying. Customers may be getting discounts they shouldn't, or missing ones you advertised.
What Shopify Functions are
Shopify's developer documentation describes Functions as a way to customise Shopify's backend logic. Its list of Function APIs includes:
- Discounts, including cart line, order and delivery discounts
- Delivery customization: renaming, reordering or hiding delivery options
- Payment customization: hiding, reordering or renaming payment methods
- Cart and checkout validation: blocking checkout when rules aren't met, such as quantity limits
- Cart transform: for bundles and similar line changes
- Order routing and fulfilment constraints
Functions are compiled to WebAssembly. Shopify provides templates for Rust and JavaScript and strongly recommends Rust for performance, so functions don't fail with large carts.
Who can use what
Shopify's documentation sets out availability:
- Stores on any plan can use public apps from the Shopify App Store that contain functions.
- Only stores on Shopify Plus can use custom apps containing Function APIs.
- Some function capabilities are Plus-only.
So for most stores, the path is: native settings first, then an App Store app that provides the rule you need. Plus stores can also commission a custom app.
Step 1: inventory the old scripts
Find out what your scripts did. If you still have the code or documentation, list each rule in plain language:
- "Buy 3 or more from the Socks collection, get 15% off those items."
- "Hide express shipping when the cart contains oversized items."
- "Hide cash on delivery for orders over a certain value."
- "Free shipping for wholesale-tagged customers."
Note which rules are still needed. Some may have been for promotions long finished. Also ask staff and your agency: rules often lived only in someone's memory, and the first sign one has gone is a customer complaint.
Step 2: check native features first
Shopify's own discount settings have grown over the years. Volume discounts, buy X get Y, automatic discounts and customer-specific discounts may cover rules that once needed a script. Shipping profiles and rates may handle some delivery rules. Native features are the easiest to maintain.
Step 3: use or build a function
For each remaining rule:
- Look for an App Store app that provides it with functions. Many cover common discount, delivery and payment rules with a settings screen instead of code.
- For unique logic, on Plus, a developer can build a custom app with one function per rule, using Shopify CLI to scaffold it.
Mind the limits
Functions run in the middle of checkout, and Shopify's documentation warns that delays can prevent customers from purchasing. It lists resource limits for carts of up to 200 line items, including an execution limit of 11 million instructions, 128 kB of input and 20 kB of output. Keep logic simple, query only the data you need, and test with big carts. The docs also note the limits don't support bulk price changes across all items, and suggest discount functions, B2B catalogues or targeting specific products instead.
Step 4: test before customers do
- Create test orders for each rule, including edge cases: exactly the threshold quantity, mixed carts, discount codes combined with automatic discounts.
- Check how rules combine. Discount combination settings decide whether a function discount stacks with a code.
- Test on mobile and in each market or currency you sell in.
- Keep a short document describing each active function, which app provides it, and who to contact.
Step 5: check what customers saw since June
Compare orders since the retirement date with your intended rules. If customers were charged without an advertised discount, consider a refund or a goodwill code. If restricted shipping or payment options were offered, check affected orders before fulfilling.
A worked example
An illustrative Calgary outdoor apparel shop on Shopify Plus had three scripts: tiered discounts on socks, hiding express shipping for tents, and free shipping for wholesale customers. After the retirement, they found tents being offered express shipping they couldn't fulfil. They rebuilt tiered discounts with native volume discount settings, used an App Store app with a delivery customization function to hide express for tagged products, and had a developer build a small custom function for the wholesale rule. Test orders confirmed each rule before a busy sale weekend.
FAQ
Do I need Shopify Plus?
Not for App Store apps that include functions. Custom apps with Function APIs require Plus.
Can functions change product prices directly?
They apply discounts and transformations rather than editing the product price. For wholesale pricing, look at B2B catalogues.
Will functions slow my checkout?
They're designed to run fast within strict limits; keep logic lean and test with large carts.
What happened to my script code?
Scripts no longer run. Keep the code as documentation of the rules you need to rebuild.
If your store's custom checkout rules stopped working with the end of Scripts, list what they used to do and we'll help you rebuild them.