Shopify Scripts stopped executing on 30 June 2026, two and a half months after editing and publishing ended on 15 April. For Plus stores that had not finished moving from Shopify Scripts to Functions, nothing visibly broke. Checkout just stopped applying the tiered discounts, wholesale prices, shipping rules and payment rules the Scripts used to handle.
This guide is for those stores, and for the ones that filled the gap after the Scripts deprecation with whatever apps they could install in a week. It covers which Function API replaces each Script type, what needs no code, the limits that catch Ruby-era logic, how to audit the old Scripts, and how to roll out the replacements.
What Shopify Scripts Did and the Functions That Replace Them
Scripts were Ruby programs, available only on Shopify Plus through the Script Editor app, in three types. Line item scripts changed prices and granted discounts on cart lines. Shipping scripts renamed, hid, reordered and discounted shipping rates. Payment scripts renamed, hid and reordered payment gateways. Only one script of each type could be published at a time, so one line item script often carried several unrelated promotions.
A Function is a WebAssembly module packaged inside an app. Shopify runs it at a fixed point in checkout, passes it JSON shaped by a GraphQL input query you write, and receives a list of operations back: apply this discount, hide this rate, show this error. The Function never edits the cart itself.
| Script type | Function APIs that replace it | What changes |
|---|---|---|
| Line item | Discount Function API (product and order discounts); Cart Transform for bundles and line overrides | Savings appear as discounts, not as a lower line price. Overriding a line’s price with Cart Transform needs Plus |
| Shipping | Delivery Customization (hide, rename, reorder); the Discount Function API’s delivery target for cheaper shipping | Delivery Customization cannot change a rate’s price. A cheaper rate is a discount, with its own combination rules |
| Payment | Payment Customization (hide, rename, reorder) | The closest one-to-one mapping. Payment terms and B2B review requirements are Plus-only operations |
| No Script equivalent | Cart and Checkout Validation | Blocks checkout with an error message, for rules Scripts could only work around |
If an agency built Functions for you early, check which discount API they used. Shopify deprecated the separate Product, Order and Shipping Discount Function APIs from API version 2025-04 in favour of the single Discount Function API, so apps still on the split APIs need moving.
What Native Discounts and Apps Cover Without a Custom Function
Before writing code, check how much of the old logic Shopify now handles natively. Much Script-era work existed only because native discounts used to be weak.
- Native discounts cover amount off products, amount off the order, Buy X get Y and free shipping, as codes or automatic discounts. A customer can use up to five product or order codes and one shipping code on an order, and a store can run up to 25 active automatic discounts, app discounts included.
- Combinations across the product, order and shipping classes are set on each discount. Shopify has been widening what can stack on the same item, so check the current combination rules for your plan before rebuilding a stacked promotion in code.
- Checkout Blocks, Shopify’s own app, lets Plus stores build conditional order and shipping discounts, hide, rename and reorder shipping and payment methods, and set order value limits without code. It runs on Functions underneath.
- Public App Store apps that contain Functions work on every plan. They run on the same APIs, so the limits below apply to them too.
The plan rule decides a lot. Only Plus stores can use custom apps that contain Functions. Every store that ran Scripts was on Plus, so custom Functions are open to you unless the store has since moved down a plan.
An app is the right answer when the rule is common and the app’s settings express it exactly. Build your own when the rule depends on your data (customer tags, metafields, B2B company records), when two apps would both discount the same cart, or when the rule carries enough revenue to deserve version control and tests. A custom Function is small but it is still software, and it needs the review and release process of any other custom app development. Weighing an app subscription against code you own is a normal part of scoping Shopify development work.
Shopify Functions Limitations That Catch Script Logic
Functions can be written in any language that compiles to WebAssembly, and Shopify provides templates for Rust and JavaScript. JavaScript is compiled with Javy, which bundles a JavaScript engine into the module, so the same logic uses more instructions, and Shopify strongly recommends Rust to avoid failures on large carts. JavaScript is fine for short rules; Rust is safer for anything that loops over every line with nested conditions.
| Limit | Value (November 2026) | What it tends to break |
|---|---|---|
| Instructions per run | 11 million for carts up to 200 lines, scaling above that | Nested loops over lines, tags and collections, mostly in JavaScript |
| Input size | 128 kB | Queries that pull several metafields for every line |
| Output size | 40 kB | Price changes on every line of a large cart |
| Compiled module | 256 KiB | Heavy dependencies |
| Input query | 3,000 bytes and a cost of 30 | Each metafield, tag check or collection check costs 3, so ten of them use the whole budget |
| Metafield values | Values over 10,000 bytes are not returned | Large JSON configuration blobs arrive as null |
| Active Functions | 25 each for discounts, delivery, payment and validation; one Cart Transform per app | Stores that replaced one Script with dozens of single-rule discounts |
Two behaviours matter more than the numbers. First, failure is quiet. If a discount Function errors or runs out of instructions, Shopify discards its output and checkout carries on without the discount. Validation Functions also let checkout proceed after a failed run unless blockOnFailure was set. Second, Functions cannot call your servers during checkout. A fetch target exists, but only for custom apps on enterprise stores after a network access request, so most rules must work from data already in Shopify, usually metafields kept current by a separate sync.
Subscriptions need their own plan: Cart Transform operations are rejected at checkout when a selling plan is present, and Cart and Checkout Validation lists subscriptions as unsupported.
Auditing Old Scripts Before a Shopify Scripts Migration
A Shopify Scripts migration most often fails here, because the people who wrote the Ruby have moved on and the promotions calendar never matched the code. Rebuild the inventory from several sources.
- The Scripts customizations report. Shopify released it in February 2025. It listed the Script customizations active on a store and recommended a Functions or app replacement for each. If you exported it, start there; if it is still visible in your admin, export it now.
- The Ruby source. The Script Editor app was retired along with Scripts, so the copy that matters is whatever your team or agency kept in version control or a shared drive.
- Order history before 30 June. Discount names, shipping rate titles and payment gateways on orders show what the Scripts actually did. Every customer tag used for pricing (wholesale, staff, VIP) is probably another rule.
Write each rule as one line: trigger, condition, effect, exceptions, and how it combines with other discounts. Then map it.
| Common Script use case | Functions replacement | Notes |
|---|---|---|
| Tiered spend discount | Native order discounts, or a Discount Function (order class) | A Function when tiers depend on customer tags, markets or metafields |
| Wholesale or VIP pricing by customer tag | Discount Function (product class), or B2B catalogues | A Function shows a discount; a catalogue shows a different price |
| Free gift above a threshold | Native Buy X get Y, or a Discount Function | A Function can discount the gift to zero but cannot add it; theme or cart code adds it |
| Bundle sold as one line, or split into components | Cart Transform (linesMerge, lineExpand) | Rejected at checkout when a selling plan is present |
| Line price override | Cart Transform (lineUpdate) | Plus and development stores only |
| Hide express shipping for PO boxes or heavy carts | Delivery Customization | Hides, renames and reorders; cannot reprice |
| Discounted shipping for members | Discount Function (delivery target), or native free shipping | If issued as a code, it uses the order’s one shipping code |
| Hide cash on delivery above an order value | Payment Customization | Hiding a method maps directly; hiding specific placements is Plus-only |
| Quantity limits, or products restricted by region | Cart and Checkout Validation | Set blockOnFailure if a failed run must stop checkout |
| Keep codes off sale items | Native eligibility rules, or exclusions inside your own Discount Function | Discount Functions run concurrently and cannot see each other |
Testing and Rolling Out Shopify Functions Safely
If Your Shopify Scripts Stopped on 30 June and Nobody Noticed
When Scripts stopped, checkout kept completing; it simply stopped applying the rules. A wholesale buyer paid retail, a heavy parcel got a rate that loses money, or cash on delivery appeared on a high-value order. Five months on, run these checks:
- Compare discount as a share of revenue, and average discount per order, for July to November against the same weeks before 30 June. A step change on 30 June is the signature.
- Place test orders as each customer type you used to treat differently: wholesale, staff, VIP and each market.
- Price a domestic cart, an international cart, a PO box address and your heaviest cart, and compare the rates and payment methods shown with what the Scripts used to allow.
- List every app that now creates discounts or customisations. Two apps covering the same rule run independently and may both apply.
- Search support tickets since July for “discount not applied”, “wrong price” and shipping complaints, and check email flows that still promise Script-era offers.
Fix revenue leaks first, then shipping margin, then presentation issues such as rate names and payment order.
Frequently Asked Questions
Conclusion
Moving from Scripts to Functions is less a code translation than a re-specification. Ruby that edited the cart becomes a set of narrow Functions that propose operations, each with its own limits and failure behaviour. Stores that write down what the Scripts did, use native features where they fit, and keep custom Functions for rules that depend on their own data end up with logic that is easier to test than the Scripts ever were.
If discounts, rates or payment rules went quiet on 30 June, your order data already shows where to start. We rebuild Script logic as tested Shopify Functions as part of our Shopify development services.
