Back to Blogs
Shopify FunctionsCheckout
Nov 2, 2026
By The Shoptimity Team
1 min read

Shopify Scripts Are Gone: Migrating to Functions Without Breaking Checkout

Shopify Scripts Sunset: Functions Migration Guide cover art

Shopify Scripts stopped running on 30 June 2026. If your store still relies on Ruby Scripts for line-item discounts, shipping rates or payment gating, that logic is already doing nothing, and the replacement path is Shopify Functions, either a public app built on Functions, or a custom Function if you are on Plus.

The edits were frozen earlier than the shutdown, on 15 April 2026, which is why some teams discovered the problem only when a promotion failed to fire in July.

What actually stopped

According to Shopify's migration guidance, three script types existed, and each maps to a different replacement:

  • Line-item scripts handled tiered pricing, tag-based VIP pricing, gift with purchase and bundle maths. They map to Discount Functions.
  • Shipping scripts hid, renamed, reordered or discounted delivery rates. Renaming and hiding map to Delivery Customization; changing a price maps to a shipping discount.
  • Payment scripts gated payment methods by cart value or customer tag. They map to Payment Customization Functions.

We checked each script type against the Function API, and two of the six rows in the table below do not port cleanly.

The mapping is not one-to-one. One shipping script that both reordered options and knocked £3 off standard delivery becomes two Functions with two deployment targets. Teams that assumed a single swap found themselves building twice.

The behaviour change merchants notice

Scripts mutated price. Functions apply discounts. A line-item script that set a bundle component to £0 simply showed £0. The Function equivalent creates a discount allocation, which renders as a struck-through price with a discount line in checkout and in the admin order.

Totals match; presentation does not. Warn customer service before the cutover, because "why is my free item showing a discount" is a ticket you will otherwise field for a month.

Two limits that break naive migrations

Functions cannot make network requests. Every input has to come from the input query or from metafields. A script that called an external service to check eligibility has to be rearchitected: sync that data into metafields on a schedule, then read it locally.

Validation Functions see the cart, not the order history. A rule like "one per customer ever" cannot read past orders from inside a validation Function. That logic belongs in a discount Function with customer data in the input, or in Flow beforehand.

Script typeFunctions replacementBehaviour change
Line-item discountDiscount FunctionPrice becomes a discount allocation
Shipping rate rename or hideDelivery CustomizationNone, output is display only
Shipping price changeShipping discount FunctionRate discount, not a rewritten rate
Payment gatingPayment CustomizationNone
Order minimums, credit checksCart and Checkout ValidationCart-only context, no order history
Custom Ruby logicCustom FunctionPlus required
Line-item discount
Functions replacementDiscount Function
Behaviour changePrice becomes a discount allocation
Shipping rate rename or hide
Functions replacementDelivery Customization
Behaviour changeNone, output is display only
Shipping price change
Functions replacementShipping discount Function
Behaviour changeRate discount, not a rewritten rate
Payment gating
Functions replacementPayment Customization
Behaviour changeNone
Order minimums, credit checks
Functions replacementCart and Checkout Validation
Behaviour changeCart-only context, no order history
Custom Ruby logic
Functions replacementCustom Function
Behaviour changePlus required

What the migration costs

Public apps cover the common patterns on any plan: tiered discounts, BOGY, spend thresholds, tag-based pricing, shipping and payment rules. For a store whose Scripts were standard promotion logic, installing an app is a week of testing rather than a development project.

Custom Functions are Plus-only and need a developer. Budget two to three days of parity testing alone, run against 20 to 40 real carts pulled from order history, including the awkward ones: the subscriber with stacked tags, the 90-line wholesale order, the cart that also carries a code.

Cutover order that works

Payment first, because a wrong payment gate is visible and reversible. Delivery second. Discounts last, in a low-traffic window, with the old script unpublished as each Function goes live and 48 hours of order watching per surface.

The limitation to state clearly: there is no rollback to Scripts. The Ruby runtime is gone, so "revert if it breaks" means reverting to a previous Function version or turning the rule off entirely.

Our verdict is to migrate anything still missing as a Function built on metafields rather than rebuilding bespoke logic. Keep the rule set small enough that one person can read it. If your discount stack includes bundles, the bundles inventory checklist covers the stock side that discount Functions do not touch, and the hidden cost of Shopify apps is worth reading before you buy a replacement suite. The Function API itself is documented at shopify.dev.

Do Shopify Scripts still work?
No. They stopped executing on 30 June 2026 for all stores, and editing was frozen on 15 April 2026. There is no opt-out and no extension.
Are Shopify Functions free?
The Functions runtime is free and public apps built on Functions work on any plan. Writing a custom Function for your own store requires Shopify Plus, plus developer time.
Why did my discounts stop applying in July?
Most likely a Script that stopped on 30 June and was never migrated. Discounts revert to zero, shipping rates revert to Shopify defaults, and payment gating disappears without an error message.
Can a Function call my ERP to check a customer?
No. Functions execute in a sandbox with no network access. Sync the ERP data into metafields and read those inside the Function instead.

Ready to build a faster, higher-converting store?

Every Shoptimity theme ships with conversion widgets built in — so you get speed and features without stacking apps.

7-day free trial · all themes included · cancel anytime