What replaces Shopify shipping scripts
Updated · SMART Shipping Rates & Rules (E-TRADE PARTNER)
Shopify Scripts stopped running on June 30, 2026; editing ended on April 15. A shipping script did two jobs, and each now has its own replacement. Hiding, renaming, and reordering rates is a delivery customization. Discounting a rate is a shipping discount. If you also want what Scripts never allowed, such as raising a price, adding a rate, or reading metafields, you need an app that returns its own rates: SMART Shipping Rates & Rules runs your own JavaScript on its checkout rates.
SMART Shipping Rates does this with zones, calculated rates, and delivery customizations.
Try it freeOn this page
Shopify's announcement says Scripts "will cease to execute entirely" after June 30, 2026 (Shopify changelog). Any shipping script still published was switched off on that date, so the rates it hid, renamed, sorted, or discounted went back to Shopify's defaults. The Help Center points merchants to Shopify Functions, through an app or a custom app (Script Editor help).
What a shipping script could do
Shipping scripts were written in a limited version of Ruby in the Script Editor app, on Shopify Plus only. They ran when checkout reached the shipping step and could act on the rates Shopify had already built.
| Script method | What it did | Replacement |
|---|---|---|
| delete_if | Hid rates that matched a rule | Delivery customization: Hide specific delivery methods or Show only specific delivery methods |
| sort_by! | Reordered rates | Delivery customization: Sort delivery methods by cost, Move delivery method to the top, or Reorder a specific delivery method |
| change_name | Renamed a rate (the carrier name stayed) | Delivery customization: Rename delivery methods (Shopify still keeps the carrier name in front) |
| apply_discount | Lowered a rate's price by a fixed amount, with a message | A shipping discount: Shopify's own discounts, or a discount Function app |
Scripts had hard limits too: they could not raise a shipping rate's price, add a rate, or read metafields or cart attributes. Shopify's own migration guide mapped shipping scripts to two Function APIs: delivery customization and discounts.
Pick the replacement for each part of your script
| Your old script did this | Use now | In SMART Shipping Rates & Rules | Carrier Service needed? |
|---|---|---|---|
| Hide Express for PO Box or remote addresses | Delivery customization | Lite: hide with Shipping address line 1/2 or Shipping ZIP/Postal Code conditions | No |
| Hide or show rates by customer tag | Delivery customization | Lite: Customer tag is any / is not any of | No |
| Hide rates when a product tag or collection is in the cart | Delivery customization | Lite: Product tag, Collection, Products, SKU | No |
| Rename rates or move one to the top | Delivery customization | Lite: Rename delivery methods, Move delivery method to the top | No |
| Discount shipping over a cart total | Shipping discount | Not a customization. On SMART's own rates, Pro zones have Discount and Discount from fields | Only for SMART rates |
| Anything that needs a new price or a new rate | Calculated rates from an app | Pro: zones, combined rates, or a shipping script | Yes |
A delivery customization can't change prices
Shopify's delivery customization API has three operations: hide, move, and rename (Shopify docs). Shopify also keeps the cheapest shipping rate preselected, so sorting a pricier rate to the top does not make it the default. Price changes need a discount or an app that calculates the rate.
Rebuild hide, rename, and sort rules (Lite)
- List what each old script did. If your admin still shows Shopify's Scripts customizations report, it lists each script with suggested replacements; otherwise work from the Ruby code.
- Open Delivery customizations in SMART and click Create delivery customization.
- Add the conditions your Ruby code checked: cart subtotal, customer tags, product tags, collections, address lines, postcode, country, B2B company, or product and variant metafields (which Scripts could not read).
- Add the action: hide, show only, move, reorder, sort, or rename. Type the method names exactly as checkout shows them.
- Set Status to Active and save. Test in a real checkout; the simulator does not apply delivery customizations.
- Keep the total under Shopify's limit of 25 active delivery customizations per store, shared by all apps. One SMART rule can hold several actions.
Full lists of actions and the 41 conditions are in Delivery customizations. Delivery customizations work from the Basic plan up, so the Plus requirement of Scripts is gone.
Write rate logic in JavaScript (Pro)
If your script was a workaround for prices that Shopify's rate settings couldn't express, rebuild it as rates instead of rules. SMART's Shipping rates > Scripts runs your JavaScript after your zones and combined rates. The code gets the cart, addresses, customer, totals, and the zone rates, and returns the final list of rates. It can raise or lower prices, add rates, set delivery days, and read the product data you tick, including up to 10 product and 10 variant metafields.
// Old Ruby idea: 50% off shipping above $100, except carts with bulky items.
const bulky = input.items.some((i) => (i.product?.tags || []).includes("bulky"));
if (bulky || input.totals.subtotal < 100) return input.rates;
return input.rates.map((rate) => ({ ...rate, price: rate.price * 0.5 }));- A SMART script works on the rates SMART sends to checkout. It does not see Shopify's own rates or other apps' rates; hide or rename those with a delivery customization.
- 13 templates cover common asks, such as a fuel surcharge, free shipping above an amount except tagged products, freight by floor metres, a fee per extra vendor, a price table by postcode, and delivery dates with a cutoff and holidays.
- Test runs the draft against a sample cart before anything reaches checkout, and every save keeps a version you can restore.
- If a script errors or runs over 5 ms, that checkout gets your zone rates or a backup rate you set, and the next checkout runs the script again.
- Calculated rates need Carrier Calculated Shipping: included on Shopify Advanced and Plus, and on Grow with annual billing or a monthly fee (Shopify Help Center).
The full input and return format, limits, and fallback options are in the shipping scripts reference. For line item and payment scripts, see the general Shopify Scripts replacement guide on our Functions Creator site.
Worked example: a Plus store's old shipping script
A furniture store's Ruby script did three things: hide Express for PO Box addresses, rename Standard to Standard (2 to 5 business days), and take $10 off shipping above $500. After June 30 all three stopped.
- Hide: a delivery customization with Shipping address line 1 contains PO Box, P.O. Box, Locked Bag, an OR group for line 2, and Hide specific delivery methods Express. Shopify supports PO Box hiding for carrier-service and app rates; with Shopify's own rates, test that the address reaches the rule. See the PO Box guide.
- Rename: a separate rule set to Always, with Rename delivery methods Standard to Standard (2 to 5 business days).
- $10 off above $500: if Standard and Express are Shopify rates, use a Shopify shipping discount. If they are SMART zone rates, set a fixed Discount of 10 with Discount from 500 (based on the cart amount) on each rate, or write it in a shipping script.
- Test the rate prices with Test checkout in the app and the hide and rename in a real checkout.
Rebuild your shipping scripts without Plus
7-day free trial. Free on development stores.
Try the app freeFrequently asked questions
›Do Shopify shipping scripts still run?
No. Shopify stopped running all Scripts on June 30, 2026, and editing or publishing ended on April 15, 2026.
›What replaced shipping scripts?
Shopify Functions: the delivery customization API for hiding, renaming, and reordering rates, and the discount API for shipping discounts. Apps install these for you, from the Basic plan up.
›Can I paste my Ruby script into SMART?
No. Rebuild the hide, rename, and sort parts as delivery customizations without code. For price logic, SMART shipping scripts use JavaScript, and the templates cover the most common cases.
›Can a replacement raise a shipping price?
Not a delivery customization or a discount. An app that calculates its own rates can: SMART zones and shipping scripts set the price of the rates SMART returns, on the Pro plan with Carrier Calculated Shipping.
›Do I still need Shopify Plus?
No. Scripts needed Plus. Delivery customization apps work on any plan from Basic up. Calculated rates need Carrier Calculated Shipping, which depends on your Shopify plan.