Scripts is gone. What a Functions migration actually involves.

In shortShopify Scripts was retired on 30 June 2026. Every discount, shipping and payment rule that lived in Scripts has to exist as a Shopify Function, which is a different runtime with different limits. The work is an inventory, a specification, a rewrite that fits the limits, a replay against last year's orders, and a staged release. Two to six weeks for most Plus stores.

Why this is not a find-and-replace

Scripts were Ruby, edited in the admin, run on every cart change with few limits. Functions are compiled to WebAssembly, deployed as part of an app, and run inside checkout under strict budgets for execution time and instruction count. Logic that looped over large carts, looked things up at runtime or accumulated years of special cases usually cannot be translated line by line. It has to be redesigned to fit.

Step one: find out what you actually have

Most Plus stores we audit have more scripts than anyone remembers, often written by a previous agency. The inventory lists each script, what it does in plain language, who in the business depends on it, when it last changed an order, and which apps overlap with it. A third of scripts typically turn out to be dead or duplicated by an app.

Step two: write the rules down before writing code

Each surviving rule becomes a one-page specification with test cases: this cart, this customer, this market, this result. Marketing and finance approve it. This is also the moment to decide what stacks with what, because Functions declare their discount combinations explicitly and Scripts often left that implicit.

Step three: build Functions that fit the limits

Discount, delivery customisation and payment customisation Functions cover the three script types. Thresholds, tiers and eligible collections move to metafields so marketing can change them without a deploy. Anything that needs external data is precomputed and stored where the Function can read it cheaply.

Step four: replay, do not hope

We export the last twelve months of orders and run their carts through the new Functions, comparing totals line by line. Every difference is either a bug or a decision you took in step two. The migration is finished when the diff is explained, not when the code compiles.

Step five: release market by market

Functions go live for one market or segment first, with discount usage and payment success watched daily, then the rest. Documentation per Function and a short session for the promotions team close the project.

What to do this week

  1. Confirm what is actually applying at checkout today. The free readiness audit includes a Scripts dependency check.
  2. Ask whoever runs promotions which rules they rely on. Compare that list with the inventory.
  3. Decide whether a discount app covers your standard patterns, and keep custom Functions for the rules that are genuinely yours.

Related.

Tell us what you are running. We will tell you what we would change.

Startups, small and mid-size brands, and listed companies. Engagements run from a two-week fix to a dedicated team. Your first call is with Abhishek Modi, our founder.

contact@mojitolabs.com +91 78275 37259

Shopify Plus Partner since 2015 · 4.9 on the Partner Directory

Reply within one business day.