Shopify Scripts is gone, and Shopify Functions is the replacement. As of June 30, 2026 all Shopify Scripts ceased to execute entirely, which means any tiered discount, free-gift, BOGO, or shipping rule still built on Scripts is now silently broken. To rebuild that logic you move each rule to a Shopify Function — Discounts API for cart and product discounts, Delivery Customization for shipping, and Payment Customization for payment methods.
A Shopify Scripts replacement simply means porting the checkout logic you used to write in Ruby Scripts over to Shopify Functions, the newer system that runs custom code natively inside Shopify’s checkout. This is not a like-for-like copy. Functions are version-controlled, deploy through the Shopify CLI, and behave differently from the old Script editor, so treat this as a rebuild rather than a paste job.
What replaced Shopify Scripts, and why now?
Shopify Functions replaced Scripts, and the deadline has already passed. Merchants lost the ability to edit or publish new Scripts on April 15, 2026, and execution stopped for everyone on June 30. Shopify has confirmed the date is final, so there is no further extension to wait for.
The urgency is compounded by timing. The Summer ‘26 Editions release shipped more than 150 platform updates while quietly reconfirming the Scripts sunset, and Black Friday planning is already underway. A discount engine that fails during BFCM is far more expensive than one you fix in a quiet week now.
After the June 30 cutoff, the logic stops executing with no storefront warning, which means a missed migration surfaces as broken checkout behaviour for shoppers rather than an alert in your admin. — Flatline Agency, on the Summer ‘26 Editions
Which Shopify Function replaces each Script?
Every Scripts use case maps to a specific Shopify Function API, and knowing the mapping is the first step of any migration. Line item discount Scripts become Discount Functions, shipping Scripts become Delivery Customization Functions, and payment Scripts become Payment Customization Functions, per Shopify’s official migration guide. Cart-restructuring logic — bundles, merged items, added free products — moves to the Cart Transform API.
| Old Scripts use case | Shopify Functions equivalent | No-code / app option | Migration effort |
|---|---|---|---|
| Tiered % or fixed discount | Discounts API (Discount Function) | Native volume discounts or a discount app | Low–Medium |
| Free gift with purchase | Discounts API + Cart Transform | Free-gift app (e.g. gift-with-purchase apps) | Medium |
| BOGO / buy X get Y | Discounts API (Discount Function) | Native “Buy X get Y” discount | Low |
| Hide / rename shipping rate | Delivery Customization API | Shipping-rule app | Low–Medium |
| Suppress a payment method | Payment Customization API | Payment-rule app | Low |
| Customer-tag pricing | Discount Function (custom) | Usually custom code required | High |
The pattern is clear: simple, single-condition rules often have a native or app-based path, while anything driven by customer tags, stacking, or multi-step conditions usually needs a purpose-built Function.
How do you rebuild tiered discounts and free gifts?
Rebuild tiered discounts as a single Discount Function that reads the cart and returns the correct discount for each threshold. Instead of Ruby that mutated line items in place, you now write a Function (Rust or JavaScript) that receives a structured cart input and returns a discount output. Shopify Functions run within a ceiling of 11 million instructions, 128 kB of input, and 20 kB of output per execution for carts up to 200 line items, so keep your query lean and your logic tight.
Free-gift promotions are the trickiest port because they often combined a discount with a cart change. In the Functions model you typically pair the Discounts API (to zero out the gift’s price) with the Cart Transform API (to add the gift line). If you are running gift thresholds to lift average order value, model the true cost first — our guide on how much discount you can afford walks through the margin math before you commit a threshold to code.
For merchants running bundle-based offers, the Cart Transform API is also where your product bundling strategy now lives, since merged and fixed bundles are no longer a Scripts concern.
What about shipping and payment rules?
Shipping and payment logic move to dedicated customization Functions that are simpler to rebuild than discounts. Delivery Customization Functions hide, rename, or reorder shipping rates — the classic “hide express shipping for heavy carts” rule. Payment Customization Functions do the same for payment methods, such as suppressing cash-on-delivery in certain regions or hiding a wallet for high-risk orders.
These two are usually the fastest wins in a migration because they carry less revenue-critical math than discounts. Many stores clear their entire shipping and payment backlog in a day, then spend the remaining time hardening discount logic before peak traffic.
How should you migrate before Black Friday?
Prioritize by revenue impact and rebuild the highest-value rules first. Start by pulling the Shopify Scripts customizations report to inventory exactly what you had, since Scripts no longer run and you cannot inspect live behaviour. Then rank each rule by how much revenue flows through it and rebuild in that order.
A practical sequence looks like this: rebuild your core promotional discounts first, test them against real carts using customer tags in a staging flow, then port shipping and payment rules, and finally re-test everything end to end before your Black Friday Shopify strategy goes live. If your team lacks Rust or JavaScript Function experience, an app from the App Store is a legitimate stopgap for standard discounts while custom logic is built.
For Farabiulder merchants running group-buy and tiered-quantity offers, this rebuild is also a chance to consolidate: the same Discount Function that restores your old tiers can power volume-based group pricing, so you migrate and upgrade in one pass rather than rebuilding twice.
The deadline has passed, but the fix is bounded and well-documented. Map each rule to its Function, rebuild by revenue priority, and test against real carts — do that and your checkout is back to full strength well before the BFCM rush.
Frequently Asked Questions
What replaced Shopify Scripts?
Shopify Functions replaced Shopify Scripts. Discount Scripts move to the Discounts API, shipping logic moves to Delivery Customization Functions, and payment rules move to Payment Customization Functions. Scripts stopped executing entirely on June 30, 2026, so any store still relying on them now has broken checkout logic.
When did Shopify Scripts stop working?
Shopify Scripts ceased to execute entirely on June 30, 2026. Merchants also lost the ability to edit or publish new Scripts on April 15, 2026. Shopify has confirmed the June 30 date is final and will not move again, so migration to Functions is no longer optional.
Can I rebuild tiered discounts without a developer?
Sometimes. Simple percentage or fixed-amount tiers can be rebuilt with Shopify's native discount tools or a no-code discount app from the App Store. Complex logic — customer-tag pricing, stacked BOGO rules, or conditional free gifts — usually needs a custom Discount Function written and deployed by a developer.
Are Shopify Functions faster than Scripts?
Yes. Shopify Functions run inside Shopify's infrastructure with a limit of 11 million instructions, 128 kB of input, and 20 kB of output per execution. They are version-controlled and deploy through the CLI, so they scale more predictably at checkout than the old Ruby-based Scripts did.
What happens if I missed the June 30, 2026 deadline?
Your discount, shipping, and payment logic simply stops running with no storefront warning or admin alert. Customers see full prices, missing free gifts, or wrong shipping options. The fix is to rebuild each rule as a Shopify Function or install an equivalent app as fast as possible before peak season traffic arrives.