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 free
On this page
  1. What a shipping script could do
  2. Pick the replacement for each part of your script
  3. Rebuild hide, rename, and sort rules (Lite)
  4. Write rate logic in JavaScript (Pro)
  5. Worked example: a Plus store's old shipping script
  6. Frequently asked questions

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 methodWhat it didReplacement
delete_ifHid rates that matched a ruleDelivery customization: Hide specific delivery methods or Show only specific delivery methods
sort_by!Reordered ratesDelivery customization: Sort delivery methods by cost, Move delivery method to the top, or Reorder a specific delivery method
change_nameRenamed a rate (the carrier name stayed)Delivery customization: Rename delivery methods (Shopify still keeps the carrier name in front)
apply_discountLowered a rate's price by a fixed amount, with a messageA 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 thisUse nowIn SMART Shipping Rates & RulesCarrier Service needed?
Hide Express for PO Box or remote addressesDelivery customizationLite: hide with Shipping address line 1/2 or Shipping ZIP/Postal Code conditionsNo
Hide or show rates by customer tagDelivery customizationLite: Customer tag is any / is not any ofNo
Hide rates when a product tag or collection is in the cartDelivery customizationLite: Product tag, Collection, Products, SKUNo
Rename rates or move one to the topDelivery customizationLite: Rename delivery methods, Move delivery method to the topNo
Discount shipping over a cart totalShipping discountNot a customization. On SMART's own rates, Pro zones have Discount and Discount from fieldsOnly for SMART rates
Anything that needs a new price or a new rateCalculated rates from an appPro: zones, combined rates, or a shipping scriptYes

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)

  1. 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.
  2. Open Delivery customizations in SMART and click Create delivery customization.
  3. 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).
  4. Add the action: hide, show only, move, reorder, sort, or rename. Type the method names exactly as checkout shows them.
  5. Set Status to Active and save. Test in a real checkout; the simulator does not apply delivery customizations.
  6. 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.

  1. 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.
  2. Rename: a separate rule set to Always, with Rename delivery methods Standard to Standard (2 to 5 business days).
  3. $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.
  4. 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 free

Frequently 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.

Related articles