Shopify Scripts Are Off: Migrate to Shopify Functions

Shopify Scripts were deactivated on June 30, 2026. What stopped working, which Function API replaces each Script, the Plus rule for custom apps, and a migration plan.

In this guide
  1. What stopped working
  2. Find out what your Scripts did
  3. How each Script maps to a Function API
  4. The plan rule: custom app or public app
  5. A migration plan you can follow
  6. Common problems after migration
  7. When to have it built for you
  8. FAQ

If your store used Shopify Scripts, something at checkout probably changed on June 30, 2026. A tiered discount stopped applying. A shipping method you used to hide is back. A payment method that should only appear for wholesale customers shows for everyone.

It is not a bug. Shopify’s migration guide says Shopify Scripts was deprecated on June 30, 2026, and “any Scripts that were still published on your store have been deactivated and no longer work.” The logic has to be rebuilt with Shopify Functions.

This guide shows what each kind of Script did, which Function API replaces it, the plan rule that decides whether you can use a custom app, and a step-by-step plan to get checkout back to how it behaved before.

What stopped working

Shopify’s Script Editor documentation lists three types of Scripts. Each one ran at a different point in checkout.

Script type What it could do What you may notice now
Line item scripts Change prices and grant discounts on cart lines Tiered, bundle, “buy X get Y” or customer-tag discounts no longer apply
Shipping scripts Change shipping methods and discount shipping rates Hidden or renamed rates are back; free or reduced shipping for some customers is gone
Payment scripts Rename, hide and reorder payment gateways Payment methods show to customers who should not see them, or in a different order

Note one detail from the same page: payment Scripts never affected wallet buttons such as PayPal Express or Apple Pay that appear before checkout. If those behaved oddly before, the cause is somewhere else.

Find out what your Scripts did

You do not need to remember every Script. Shopify generated a report for you.

  1. In the admin, go to Apps > Script Editor and open the Replace Shopify Scripts banner, or follow the Scripts report link.
  2. The customizations report groups your Scripts into Payment gateways, Shipping and Product discounts. Each entry shows the Script name, a description, a link to its source, recommended apps and Functions tutorials.
  3. Export it as CSV. This is your migration list.

If you still have the Ruby source of a Script, keep a copy. It is the most precise record of the rules: which tag qualifies, which threshold applies, which rates are excluded.

How each Script maps to a Function API

Shopify Functions replace Scripts. They are small programs compiled to WebAssembly, shipped inside an app, and run by Shopify during checkout. Shopify’s Scripts migration page for developers maps use cases to tutorials. Here is the same mapping organised by Script type.

What the Script did Function API Notes from Shopify’s docs
Discount cart lines (tiers, BOGO, tag-based prices) Discount One function can apply product, order and shipping discounts. Up to 25 discount functions active per store
Discount shipping rates Discount, delivery target Shipping discounts run on delivery options
Hide, rename or reorder shipping methods Delivery Customization Hide, move and rename only. The cheapest shipping option must stay first. Up to 25 active per store
Hide, rename or reorder payment methods Payment Customization Up to 25 active per store. Payment terms and B2B review need Plus
Block checkout when a rule is broken (quantity limits, address rules) Cart and Checkout Validation Errors can attach to the cart or a field. Up to 25 active per store
Change a line’s price, title or image, or build bundles Cart Transform Expand, merge and update lines. Price updates (lineUpdate) need Plus or a development store. One cart transform per app per store

Two things in that table catch teams out.

Price changes are not discounts. A line item Script could simply set a new price. In Functions, the usual route is a discount. If the price itself has to change, lineUpdate in the Cart Transform API can do it, but only on Plus or development stores.

Shipping prices cannot be edited by a Delivery Customization. It can hide, move and rename options, nothing else. To lower a shipping rate, use a shipping discount from the Discount API. To set rates themselves, use the store’s shipping settings or a carrier-calculated rate.

Some jobs Scripts could not do at all now have their own Function APIs, such as order routing location rules and fulfillment constraints. If you worked around a routing problem with a Script and a manual step, this is a good moment to revisit it. Our guide to custom logic with Shopify Functions goes through those APIs in more detail.

The plan rule: custom app or public app

Functions always run inside an app. Which kind of app you can use depends on your plan. Shopify’s Function API reference states it plainly:

  • Stores on any plan can use public apps from the Shopify App Store that contain functions, with exceptions noted on individual API pages.
  • Only Shopify Plus stores can use custom apps that contain Function APIs.

If your store is on Plus, you can use either path, and the choice comes down to fit:

Path Good fit when Watch for
Public app with functions The rule is common: tiered discounts, hiding a payment method by country or tag, renaming a rate You configure the app’s rules, not your own code. Check it covers every edge case in your CSV
Custom app with functions (Plus) The rule depends on your own data, metafields or several conditions together Someone has to build, host and maintain it. New custom apps are created in the Dev Dashboard
Built-in features Shopify’s own discounts or checkout settings already do it Often overlooked; check before installing anything

A useful rule of thumb: install an app for the common rules, and build only the rules no app covers. If you are weighing that choice in general, read when to build a custom Shopify app.

A migration plan you can follow

1. Sort the list

Open the CSV and add three columns: keep or drop, replacement, owner. Shopify’s guide suggests the same first step: decide which customizations to keep and ignore the ones you no longer use. Old Scripts for a campaign that ended two years ago do not need a replacement.

2. Write each rule in one sentence

For each Script you keep, write the rule in plain words. For example: “Customers tagged wholesale get 15% off products in the Bulk collection when they buy 10 or more.” This sentence becomes the test case later. If you cannot write the sentence, read the Ruby source or ask whoever wrote it.

3. Pick the replacement

For each rule, check in this order:

  1. A built-in Shopify feature, such as automatic discounts.
  2. An App Store app recommended in the customizations report.
  3. A custom function, if you are on Plus and nothing else fits.

4. Build or configure on a development store first

Functions read their data through an input query you write in GraphQL, so the function receives only what it asks for, such as cart lines, customer tags or metafields. Shopify publishes templates for Rust and JavaScript and recommends Rust for performance with large carts. Keep the limits in mind: an input query of up to 3,000 bytes and a query cost of 30, a compiled binary of 256 kB, and an instruction budget that scales with cart size.

If your Script read data that lived outside Shopify, plan where it will live now. Metafields are the usual answer, because the function can read them in its input query.

5. Test against your one-sentence rules

Shopify’s testing guide for Functions describes several layers:

  • Unit tests in your language’s own tooling, such as cargo test for Rust or Vitest for JavaScript.
  • Execution logs streamed to your terminal by shopify app dev, and every run on a development store logged in the Dev Dashboard.
  • Replay with shopify app function replay, which reruns a logged execution as you change the code.
  • Manual checkout runs on a development store, which Shopify calls the best way to confirm behaviour in a real store.

For each rule, test at least: a cart that qualifies, a cart just under the threshold, a customer without the tag, a mixed cart, and a large cart. Include express checkouts if the rule affects payment or validation.

6. Go live and clean up

Shopify’s migration steps end with: test the replacement, then deactivate the Script. Since published Scripts are already deactivated, your remaining job is to activate each replacement, place a real test order, and remove leftover notes or theme workarounds staff added while checkout was broken.

7. Write it down

Record which app or function owns each rule and who maintains it. A custom function lives in an app that needs updates; see how to maintain a custom Shopify app.

Common problems after migration

Symptom Likely cause What to check
Discount applies twice or not at all Two discount functions or a function and a code combine differently than expected The combination settings on each discount; all active discount functions run without knowing about each other
Renamed shipping rate shows the carrier name Shopify prepends the carrier name automatically Expected behaviour; adjust the new name so it reads well
Function works in tests, fails on big carts Instruction or input limits Function run logs; trim the input query or switch to Rust
Price change rule rejected lineUpdate used outside Plus, or a selling plan in the cart Store plan and subscription items

When to have it built for you

Many common Scripts have a ready replacement in an app or a built-in feature. A custom function makes sense when the rule is specific to your business, depends on your own data, or no app handles every case in your list. Our custom solutions page describes the work we take on, including custom apps with functions for Plus stores, and how to brief a developer shows what to send: your CSV and the one-sentence rules are a good start.

Scripts are not the only checkout change this year. If you also used additional scripts for tracking, see Thank you and Order status page upgrade, and if you have an app that touches shipping settings, read market-driven shipping and custom apps.

FAQ

Can I turn my Shopify Scripts back on?

No. Shopify’s help center says Scripts still published on June 30, 2026 were deactivated and no longer work. The logic has to be rebuilt with Shopify Functions, through an app or your own solution.

Do I need Shopify Plus to use Shopify Functions?

Not for public apps. Stores on any plan can use App Store apps that contain functions. Only Shopify Plus stores can use custom apps that contain Function APIs, and some operations, such as lineUpdate in Cart Transform or payment terms, need Plus as well.

Can I paste my Ruby Script into a Function?

No. Functions are compiled to WebAssembly, usually from Rust or JavaScript, and they read data through a GraphQL input query. The Script’s rules carry over; the code has to be rewritten.

Which Function replaces a shipping Script that discounted rates?

The Discount Function API, using its delivery target for shipping discounts. A Delivery Customization function can only hide, reorder or rename shipping options, not change their price.

How many functions can a store run?

Shopify’s docs set a maximum of 25 active functions per store for each of the Discount, Delivery Customization, Payment Customization and Cart and Checkout Validation APIs, and one cart transform function per app on each store.

Sign in to your workspace

Each workspace has its own address: <workspace>.getstorefleet.com. Enter your workspace name, or paste its address, and we take you to its sign-in page.

You will go to

New to StoreFleet? Create a workspace