Replace a Shopify Scripts shipping script with ShipWith
Shopify is retiring Shopify Scripts in favor of Shopify Functions. If your store used a shipping script to hide, rename, or reorder delivery methods, you can rebuild that behavior with ShipWith rules. ShipWith runs on Shopify's delivery customization Functions, so there's no Ruby to write or maintain.
Map your script to ShipWith
Most shipping scripts do one or more of these jobs:
| Your shipping script… | ShipWith action | |---|---| | Hides rates for certain addresses, products, or customers | Hide specific delivery method(s) with conditions | | Changes a rate's display name | Rename delivery method(s) | | Moves rates up or down the list | Sort delivery methods by cost low-high, or reorder actions | | Shows only one rate | Show only the cheapest rate |
ShipWith changes delivery options that Shopify already supplies. Like shipping scripts, it can't create new rates or change their prices.
Start from a ready-made rule set
Download scripts-replacement-hide-rename-reorder.json and import it from the ShipWith Dashboard with Import. It contains two rules that reproduce a typical shipping script. Both use Address input and import as Off:
- Hide Express for PO box addresses (priority 0): if the destination is a PO box, hide methods whose title or handle contains
Express. - Rename Standard and sort cheapest first (priority 1, runs always): rename
StandardtoStandard (3–5 days), then sort all methods by cost, cheapest first.
One difference from many scripts: ShipWith has no action that moves only the cheapest rate to the top. Sorting by cost puts the cheapest first and also reorders the rest by price.
After importing, change the method names to match your store, then set each rule to Live, select Save, and wait for Synced. See Export and import shipping rules for details.
Migrate safely
- Write down what your current script does for each case: which rates it hides, renames, or moves, and when.
- Build or import the matching ShipWith rules and leave them Off.
- Set the rules to Test so only customers tagged
shipwith-testsee them, and check every case at checkout with a tagged customer. - When the results match, turn off the shipping script, set the rules to Live, and test again.
Rules that use the same Function input run in Priority order, lowest number first. Keep related rules on the same input when their order matters. See Understand rule priority and action order.
