Find and Replace in Name
Replace text in shipping rate names, like changing “Express” to “Holiday Express” in every rate. A Playwright Checkout Rules template for shipping options.
What it does
Playwright replaces every exact occurrence of the text in the selected rates’ names. The match is exact: capital letters and spaces count.
Shopify always shows the carrier’s name before a renamed rate.
For example:
- Replace 'Express' with 'Holiday Express' in all shipping rates
Settings
Find it under Shipping Rules in Playwright, in Rename Rates. Give the rule a name, fill in these settings and select Save Rule.
- Rates to Change
- Which shipping rates to rename. With “None” the rule renames nothing. See Choosing shipping rates.
- All: Every shipping rate.
- Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters.
- Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter.
- Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published.
- Rate Price: Rates above or below a price, in dollars.
- Rate Discounted: Rates an earlier shipping rule did or didn’t discount.
- Multi-Select - Meets all criteria: Combines up to three choices; all must match.
- Multi-Select - Meets any criteria: Combines up to three choices; any can match.
- Pattern to match
- The exact text to find. Capital letters and spaces count.
- Replace with
- The text to put in its place. Leave it empty to remove the text.
Example: Holiday names
- Rates to Change: All.
- Pattern to match:
Express. Replace with:Holiday Express.
At checkout: “UPS Express” shows as “UPS Holiday Express”. A rate called “express” (lower case) doesn’t change.
On Shopify Functions
Playwright publishes this template as part of the Shopify customization “Playwright: shipping rules”.
- Shopify always shows the carrier name before a renamed shipping rate.
These conditions aren’t available in shipping option rules, so a rule that uses one isn’t published:
- Rate Source: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead.
Tag conditions match whole tags only. See Conditions and Publishing.