Tr?id=1076949064639753&ev=PageView&noscript=1
$56M+ Revenue Generated for Clients 450+ Happy Clients 30+ Team Members AI Powered Services
Article · Shopify & Ecommerce

Shopify Scripts Are Gone: Moving Discounts and Shipping Logic to Shopify Functions

Scripts stopped running on 30 June 2026. Here is how to map each old script to a Function, an app or a native setting

Raghav Mittal
Contributor Raghav Mittal Oct 3, 2026 · 7 min read
Illustration of an online storefront, product cards and a growth chart

In short

  • Shopify Scripts could no longer be edited or published from 15 April 2026 and stopped executing on 30 June 2026.
  • Line item scripts map mostly to the Discount and Cart Transform Function APIs, shipping scripts to Delivery Customization, and payment scripts to Payment Customization.
  • Many old scripts can now be replaced by native discount settings or a public app, so custom code should be the last option, not the first.
  • Only Shopify Plus stores can run custom apps containing Functions; stores on any plan can use public App Store apps built on Functions.
  • Test every Function against real cart scenarios, including COD, discount stacking and large carts, before relying on it during a sale.

Shopify Scripts no longer run. Per Shopify's developer changelog, editing and publishing Scripts ended on 15 April 2026 and all Scripts stopped executing on 30 June 2026. Any tiered discount, free gift, shipping rule or payment rule that relied on the Script Editor now needs to live in Shopify Functions, a Functions-based app, or a native Shopify setting.

If your checkout feels "off" since July, or your team has been working around missing logic manually, this guide shows how to map each old script to its replacement and roll it out safely.

Why this matters even after the deadline

Scripts were a Shopify Plus feature, written in Ruby and run at checkout. Because they failed silently when they stopped, some stores did not notice immediately. Common signs that a script is missing:

  • "Buy 2, get 10% off" or tiered offers no longer apply automatically.
  • Free gifts are not added or not priced at zero.
  • Express shipping shows for pin codes where you cannot deliver it.
  • COD appears on high-value orders you used to restrict to prepaid.
  • Wholesale or VIP customers see retail prices.

Before the festive season peak, confirm every rule your promotions depend on is actually firing.

Step 1: List what your scripts did

Shopify's Scripts transition guide describes a customizations report in the admin, organised into product discounts, shipping and payment gateways, with script names, descriptions, source links and suggested compatible apps. Export it and turn it into a simple table:

ScriptTypeBusiness rule in plain EnglishStill needed?
Tiered_bundle_v3Line item10% off 2 items, 15% off 3 or more from the Skincare collectionYes
Hide_express_remoteShippingHide Express for north-east and remote pin codesYes
COD_limitPaymentHide COD above a set order valueYes
Diwali_2023_giftLine itemFree diya with orders over a thresholdNo

Writing each rule in plain English is the most valuable part of the migration. Old scripts often carry logic nobody remembers, and some of it no longer matches how you sell.

Step 2: Map each script to its replacement

Shopify lists its Function APIs in the developer documentation. These are the ones that replace most Scripts:

Old script typeTypical useFunction API
Line itemTiered, volume, BOGO, customer-tag pricingDiscount
Line itemBundles, free gifts, changing how items appear in cartCart Transform (plus Discount for pricing)
ShippingHide, rename or reorder shipping methodsDelivery Customization
ShippingShipping discountsDiscount (applied to delivery)
PaymentHide, rename or reorder payment methods, such as COD rulesPayment Customization
AnyBlock checkout when rules are not met, such as maximum quantityCart and Checkout Validation

Functions are not a line-by-line port of Ruby scripts. They receive a defined input (cart lines, customer, delivery options), run your logic, and return operations such as "apply this discount" or "hide this method". Think in terms of the business rule, not the old code.

Step 3: Choose native, app or custom

For each rule, work down this ladder and stop at the first option that fits:

  1. Native Shopify settings. Automatic discounts, buy X get Y, discount combinations and shipping profiles cover more than they did when many Scripts were written.
  2. A public app built on Functions. There are established apps for tiered discounts, bundles, shipping rules and payment rules. According to Shopify's Functions documentation, stores on any plan can use public App Store apps that contain Functions.
  3. A custom app with your own Functions. Shopify's documentation states that only Shopify Plus stores can use custom apps containing Function APIs. This is the right choice for unique logic such as B2B price lists driven by metafields, or rules tied to your ERP data.

A common outcome for a Plus brand is two or three rules covered natively, two by an app, and one or two genuinely custom Functions.

Step 4: Build custom Functions the right way

If you go custom, a few technical decisions matter:

  • Language: Functions compile to WebAssembly. Shopify provides templates for Rust and JavaScript and recommends Rust as the most performant choice to avoid failures with large carts. For a festive sale where carts can be large, this is worth taking seriously.
  • Configuration, not hardcoding: store thresholds, collection IDs and percentages in metafields so your marketing team can change a campaign without a developer deploy.
  • Input queries: request only the cart data you need. Smaller inputs are faster and easier to test.
  • Version control and ownership: keep the app in a repository with a named owner, because Function APIs are versioned and will need occasional updates.

Worked example: COD limit and remote pin codes

Consider a hypothetical Indian apparel brand on Plus with two old rules: hide COD above ₹10,000, and hide Express shipping for a list of remote pin code prefixes.

  1. A Payment Customization Function reads the cart subtotal and hides the COD method when it exceeds a threshold stored in a metafield.
  2. A Delivery Customization Function reads the shipping address postal code, checks it against a prefix list stored in a metafield, and hides the Express option when it matches.
  3. The marketing team can change the COD limit for a sale weekend by editing one metafield value.

Both rules are short, testable and far easier to maintain than the Ruby they replace.

Step 5: Test like it is sale day

Discount and checkout bugs cost real money, so test with a matrix rather than a couple of happy-path orders:

  • Every tier boundary: one item, exactly the threshold, one item over.
  • Combinations: your new automatic discount plus a coupon code, a free shipping threshold and a gift card.
  • Payment rules: COD and prepaid on either side of any value limit.
  • Shipping rules: a metro pin code, a remote pin code and an international address if you sell abroad.
  • Large carts: 30 or more line items, to check performance.
  • Customer segments: logged-out, logged-in retail and tagged wholesale customers.

Record expected versus actual results in a sheet. When something fails, you will know exactly which rule and scenario to fix.

A realistic timeline

For a typical Plus store with four to eight scripts, a sensible plan looks like this. Treat it as a guide; the real duration depends on how many rules need custom code.

WeekWork
Week 1Export the customizations report, write rules in plain English, decide native, app or custom for each
Week 2Configure native discounts and install apps; build custom Functions in a development store
Week 3Run the test matrix, fix edge cases, brief customer support on any visible changes
Week 4Go live outside a sale period, monitor orders and discount reports daily

Avoid launching new checkout logic in the week of a major sale. If a sale is close, ship the simplest version that protects margin, such as the COD limit, and schedule the rest for afterwards.

Step 6: Clean up and document

Once live, remove any stopgap manual discount codes your team created to cover missing scripts, and archive the old script source for reference. Write a one-page "checkout rules" document listing every active discount, Function and app, what it does and who owns it. It saves hours when a campaign behaves unexpectedly.

If you are also reviewing the rest of your stack, our Shopify automation stack guide covers the apps and workflows that pair well with Functions, and our Shopify Plus page explains what else the plan unlocks.

Getting your checkout logic back

If your promotions, shipping rules or COD controls have been missing since June, the fix is usually a short, well-scoped project rather than a rebuild. The Night Marketer's Shopify development team can audit what your Scripts used to do, choose native, app or custom replacements, and build and test the Functions your checkout needs before your next big sale.

Frequently asked questions

According to Shopify's changelog, all Shopify Scripts ceased to execute on 30 June 2026, after editing and publishing were disabled on 15 April 2026. Any discount, shipping or payment logic that depended on a script simply stopped applying at checkout. If you have not replaced it, customers are seeing default prices, shipping rates and payment options.

Not for public apps. Stores on any plan can install App Store apps that are built on Functions. You need Shopify Plus only if you want a custom app containing your own Functions, built specifically for your store. Some individual Functions capabilities are also restricted to Plus, so check each app's plan requirements.

Start with native discount settings, then a well-reviewed public app. Build a custom Function only when your logic is genuinely unique, such as tiered B2B pricing tied to customer tags or a complex bundle rule, and when the cost of an app subscription and its limitations outweighs development and maintenance. Custom Functions also need an owner for future API updates.

Functions compile to WebAssembly. Shopify provides templates and libraries for Rust and JavaScript, and its documentation recommends Rust as the most performant option, particularly to avoid failures on large carts. JavaScript is often quicker for teams already working in the Shopify app ecosystem, but test performance with realistic cart sizes.

Shopify generates a Scripts customizations report in the admin that lists your scripts, their descriptions and source, and suggests compatible Function-based apps and tutorials. If you cannot access it, check your team's records or Git history, and review past sale mechanics to reconstruct what the scripts did.

Want this applied to your store?

Get a free audit of your biggest conversion and SEO leaks, or size the upside with our CRO calculator first.