Migrating from Shopify Scripts to Functions after the deadline
Functions can replicate most of what Scripts did, but not all of it. And the migration is harder now than it was before April 15, 2026, because you can no longer open the original Script to see what it did. This is how to rebuild from evidence when the source code is gone.
Shopify Scripts stopped running on June 30, 2026, and editing was switched off ten weeks before that. If you're reading this, both dates have passed, so you're not really migrating code. You're working out what the code was meant to do.
What can Functions do that Scripts did?
Most of it. Functions cover product discounts, order discounts, shipping discounts, payment method customization, delivery option customization and cart transforms. That covers the vast majority of what Plus merchants built with Scripts.
They're also better in some ways that matter. Functions run on every plan, not just Plus. They run server-side inside checkout, so they behave the same whether an order comes through the web, POS or the API. And they're properly versioned as app code, so the next person can read them.
What can Functions not do?
Three things tend to trip people up.
Discount stacking is more limited. Scripts let you write whatever logic you wanted to combine discounts. Functions work within Shopify's discount classes and combination rules, so a Script that layered three overlapping promotions might not work as a single Function. Usually it turns into two or three, plus explicit combination settings.
There are execution limits. Functions run within a fixed instruction and time budget. A Script that looped through every line item doing an external lookup won't port over directly. In practice this hits carts with a very large number of line items, which tends to mean B2B.
They can't call out mid-checkout. Scripts couldn't reliably do this either, but plenty of teams found workarounds that Functions shut down. If your pricing depends on a live call to an ERP, that logic has to move. Either pre-calculate it into metafields, or have an app handle it before the cart reaches checkout.
How do I work out what the Script did if I cannot open it?
Four sources, starting with the most useful.
- The Script Editor app still lists your Scripts. You can't edit them, but the titles and descriptions are still there, and they're often more detailed than people remember.
- Your order history before June 30. This is your best evidence. Pull orders from May and June, look at the discount and shipping lines, and work backward to the rule. If every order over $150 shows free shipping, that's your threshold.
- Your own marketing. Whatever you were advertising is what the Script was supposed to deliver. Old campaign emails and landing pages work as a spec.
- Version control, if the Script was ever kept in a repo. It's rare, but worth ten minutes of checking before you rebuild from scratch.
Then check your rebuild against real orders. Take twenty orders from June that the rule should have applied to, run your new Function against the same carts in a development store, and make sure the totals match.
Should I rebuild everything?
No, and the time since June helps you here. You've had two months of the business running without these rules. If nobody noticed a particular Script was gone, that tells you something.
Sort your list into three buckets. Rules that have left a measurable revenue gap since July 1 get rebuilt now. Rules where the impact isn't clear wait until you can put a number on them. Rules tied to promotions that have ended get deleted, and it's worth hunting for these. Obsolete Scripts are common, because nobody was in a hurry to remove them while they were still running.
What does the rebuild take?
A simple discount or shipping rule takes a day, including testing. A B2B pricing structure with tiers by customer segment is closer to a week, and most of that time goes on confirming the tiers, not writing code.
Functions are deployed as a Shopify app, which surprises merchants who expect to paste code into the admin. You'll need a Partner account, the Shopify CLI and somewhere to host the app. For a custom Function used by a single store, though, that's a small bit of infrastructure, not a whole product.
The real cost isn't the code. It's figuring out what the rules should be, getting someone to sign off on them, and testing against real carts. Budget for that.
We've rebuilt Script logic for Plus merchants who no longer had the original code. If that's where you are, the order-history reconstruction is the part to get right.