Shopify Functions are small pieces of custom backend logic that run inside Shopify’s checkout to control discounts, delivery options, payment methods, cart validation and more. They replaced Shopify Scripts, which stopped working on 30 June 2026, and a typical Script-to-Function rebuild takes 1–6 weeks depending on how many Scripts a store ran.
If your store lost tiered discounts, hidden shipping rates or payment rules when Scripts were switched off, this guide explains which Function API replaces each Script, what you can buy off the shelf, when you need a custom Shopify app built around Functions, and what the work typically costs.
Key takeaways
- Scripts are gone: Shopify deactivated every published Script on 30 June 2026, so any logic not rebuilt as a Function is no longer running.
- Seven Function APIs cover most needs: Discount, Delivery Customization, Payment Customization, Cart Transform, Cart and Checkout Validation, Fulfillment Constraints and Order Routing.
- Plan matters: stores on any plan can use public apps that contain Functions, but only Shopify Plus stores can run custom apps with Functions.
- Cost: a partner-built Function rebuild typically runs USD 1,500–15,000+, depending on the number and complexity of rules.
What are Shopify Functions?
Shopify Functions let developers inject custom logic into Shopify’s backend at specific points in the buying journey. Each Function is compiled to WebAssembly, packaged inside an app, and executed by Shopify itself, so it runs fast and scales with flash-sale traffic.
Unlike Scripts, which were Ruby snippets edited in the Script Editor, Functions are versioned app code. Merchants configure them in the Shopify admin, for example as a discount or a payment customization, while developers own the logic. Shopify publishes the full list of APIs and limits in its Shopify Functions documentation.
Functions also run with strict resource limits, including an 11 million instruction budget for carts of up to 200 line items and a 256 kB binary size cap. Good Function design keeps logic lean and pushes heavy data into metafields that the Function reads at runtime.
What happened to Shopify Scripts on 30 June 2026?
Shopify Scripts were deprecated on 30 June 2026. Any Scripts still published on a store were deactivated and no longer run, which means line item discounts, shipping rate edits and payment method rules built with Scripts silently stopped applying at checkout.
Shopify provides a Scripts customizations report in the admin that lists what each store was running and suggests compatible apps or Function docs. You can export it as a CSV, and it is the best starting point for scoping a rebuild. Shopify explains the report in its guide to migrating from Scripts to Functions.
Common symptoms we see after the cut-off include:
- Tiered or volume discounts no longer applying in the cart
- Free shipping thresholds or hidden express rates reverting to defaults
- Cash on delivery or other payment methods showing for customers who should not see them
- Wholesale or VIP pricing rules no longer triggering for tagged customers
Which Shopify Function replaces each type of Script?
Each Script type maps to one or more Function APIs. The mapping below covers the patterns most stores relied on.
| Old Script type | Function API | Typical use |
|---|---|---|
| Line item Script | Discount | Tiered, BOGO and customer-tag discounts |
| Line item Script (bundles) | Cart Transform | Bundle pricing and line expansion |
| Shipping Script | Delivery Customization | Hide, rename or reorder shipping rates |
| Shipping Script (discounts) | Discount (shipping class) | Free or reduced shipping rules |
| Payment Script | Payment Customization | Hide, rename or reorder payment methods |
| Checkout guard logic | Cart and Checkout Validation | Block orders that break quantity or address rules |
Two newer APIs have no Script equivalent. Fulfillment Constraints controls how items are grouped for fulfillment, and Order Routing Location Rule influences which location fulfills an order. Both are useful for multi-warehouse stores.
How do Shopify discount Functions work?
The current Discount Function API handles product, order and shipping discounts in one Function. A single Function powers one discount, code-based or automatic, but can apply savings across all three discount classes. Shopify documents this in the Discount Function API reference.
A store can activate up to 25 discount Functions. They run side by side without knowing about each other, so how discounts stack is controlled by combination settings on each discount rather than by code. This is a common source of surprise when a Script handled stacking logic internally. Our guide to variant-level publishing and discount stacking covers the stacking rules in more depth.
Typical discount Functions we rebuild include:
- Spend-based tiers, such as 10% off over USD 100 and 15% off over USD 200
- Customer-tag pricing for wholesale, staff or VIP segments
- Buy X get Y rules with product or collection conditions
- Market-specific discounts that change by country or currency, as in our multi-market discount scheduling case study
- Gift-with-purchase logic, similar to our automated free gift campaign on cart
How do you control shipping and payment rules with Functions?
Delivery Customization and Payment Customization Functions change what customers see at checkout. Each API supports up to 25 active customizations per store, which is enough for most rule sets when the logic is designed well.
Delivery Customization
Delivery Customization can hide, rename or reorder delivery options. Common rules hide express shipping for oversized items, rename rates with delivery promises, or hide options for specific postcodes. Hiding rates for PO Box addresses only works for rates from carrier services or third-party shipping apps. For price-based rate logic, see how we built a custom Shopify shipping app with currency rules.
Payment Customization
Payment Customization can hide, rename and reorder payment methods, and set payment terms and review requirements for B2B orders. Stores use it to hide cash on delivery above an order value, restrict buy now, pay later providers to supported countries, or show bank transfer only to approved trade customers. Our Checkout IQ payment rules case study shows this pattern in production.
Do you need Shopify Plus to use Functions?
Not always. Stores on any plan can use public apps from the Shopify App Store that contain Functions. Only stores on Shopify Plus can install custom apps that contain Functions, which is the route for logic unique to your business.
That gives non-Plus stores two options: find a public app that already covers the rule, or restructure the rule so a configurable public app can handle it. Plus stores can also commission a private Function built exactly around their pricing, shipping or payment policy.
How much does a Scripts to Functions migration cost?
A partner-led migration typically costs USD 1,500–15,000+. Cost depends on how many Scripts you ran, how much logic they combined, and whether you also need a merchant-facing settings screen so your team can change thresholds without a developer.
| Scope | Typical rules | Timeline | Typical cost (USD) |
|---|---|---|---|
| Simple | 1–2 discount or payment rules | 1–2 weeks | 1,500–4,000 |
| Mid-size | 3–6 rules across discounts, shipping and payments | 2–4 weeks | 4,000–9,000 |
| Complex | Multi-market, B2B or bundle logic with admin UI | 4–6+ weeks | 9,000–15,000+ |
Budget for hosting only if your app needs a backend for settings screens. The Functions themselves run on Shopify’s infrastructure at no extra hosting cost.
What is the best way to plan a Scripts to Functions rebuild?
- Export the Scripts customizations report from your Shopify admin
- List every rule in plain English, with examples of carts that should and should not qualify
- Check the App Store for public Function apps that already cover simple rules
- Group the remaining rules by Function API to keep the number of Functions low
- Move configurable values such as thresholds and tags into metafields
- Build and test on a development store with real cart scenarios
- Launch, then compare discount and payment reports with pre-cut-off data
Checkout logic works best alongside a clean checkout experience. If you are rebuilding rules anyway, review our guide to Shopify checkout customization for higher conversions at the same time.
Why choose Amwhiz for your Shopify Functions rebuild?
Amwhiz is a Shopify Partner with in-house developers who build Function-based apps for discounts, shipping and payment rules. We have shipped payment rule engines, multi-market discount scheduling and custom shipping logic for Shopify merchants, so we start from proven patterns instead of a blank page, and we design every rule so your team can adjust it later without code changes.
Still missing logic your Scripts used to run? Talk to Amwhiz about custom Shopify app and Function development and get a fixed-scope rebuild plan.
Talk to a Shopify developer
Book a free 30-minute call with our Shopify team to review your store and plan the next build.
Book a free consultationFrequently asked questions
What are Shopify Functions?
Shopify Functions are custom backend logic that runs inside Shopify’s checkout. They control discounts, delivery options, payment methods, cart validation, bundles and fulfillment rules, and are delivered through apps.
Do Shopify Scripts still work?
No. Shopify deprecated Scripts on 30 June 2026 and deactivated any that were still published. Stores need Shopify Functions or Function-based apps to restore that logic.
Can I use Shopify Functions without Shopify Plus?
Yes, through public apps from the Shopify App Store that contain Functions. Custom apps that contain Functions can only be used by stores on Shopify Plus.
How many discount Functions can a store run?
A store can activate up to 25 discount Functions. Delivery customization and payment customization Functions each have their own limit of 25 per store.
How long does it take to migrate from Scripts to Functions?
Simple rebuilds with one or two rules usually take 1–2 weeks. Stores with several combined rules, multiple markets or B2B logic typically need 2–6 weeks including testing.