Shopify Scripts to Functions: get wholesale pricing back

Shopify Scripts stopped running on June 30, 2026, so any wholesale or tiered price a script gave is gone. Write down what each old script did, then rebuild it with a B2B catalog, a built-in discount, an App Store app that uses Shopify Functions, or your own Function.

Field guide · Shopify plus brands · Shopify Plus · Published · Get the PDF

Long exposure of a warehouse aisle at night: a clean outline of light fitted around a looping band, closed by a blue period

What stopped on June 30, 2026?

Shopify’s developer changelog set two dates:

  • April 15, 2026: “Editing and publishing new Shopify Scripts will no longer be possible.”
  • June 30, 2026: “All Shopify Scripts will cease to execute entirely.”

Shopify’s help center confirms the Script Editor app was retired that day “and scripts no longer run on any store.” Discount, shipping and payment scripts all stopped.

Pull the orders your wholesale customers placed since July 1, 2026 and compare what they paid with their agreed prices.

How do you find out what your old scripts did?

1. Get the script code from whoever wrote your scripts.

2. Check it against real orders. Open a few wholesale orders from before June 30, 2026 and note what each line paid against list price.

3. Write the rules as a table. One row per rule: who gets it, which products, the quantity, the price or percentage, and what it combines with.

Example ruleWhoProductsPrice
Wholesale baseCustomers tagged wholesaleEverything40% off list
Case priceCustomers tagged wholesaleCoffee, 12 or more bags45% off list
Free freightCustomers tagged wholesaleOrders of 24 bags or moreFree ground shipping

Which replacement fits your pricing?

OptionGood forWatch for
B2B catalog (Markets > Catalogs)Wholesale price lists, percent off list, quantity price breaksBuyers are set up as companies; Basic, Grow and Advanced allow 3 active catalog assignments; assigning a catalog straight to a company location is Plus only
Automatic discount for a customer segmentOne percent or amount off for tagged customersCombination settings with your other discounts
An App Store app that uses Shopify FunctionsTiered, bundle or shipping rules an app already coversThe app’s own fees and limits
Your own Function in a custom appRules no app covers, in code you ownCustom apps that contain Functions need a Plus plan
Bring in an outside team (Custom software)Several scripts with mixed rules, and wholesale customers waitingNeeds admin access and whoever knows the old pricing rules

How do you set wholesale prices in a B2B catalog?

1. Create the catalog. Go to Markets > Catalogs and click Create catalog. Enter a title (customers don’t see it) and select Draft while you work.

2. Set the base discount. In the Pricing section, select Decrease and enter the percentage.

3. Set fixed prices where you need them. In the Products section, enter a price in the Price column. Shopify says a fixed price overrides the catalog’s percentage adjustment for that product.

4. Add quantity breaks. Click Manage > Manage products and pricing. Hover over a product, click + Add in the Volume pricing column, then + Add quantity price breaks. Click Done, then Save. Shopify allows up to 10 price breaks per product.

5. Assign it. Add it to a B2B market, or on Plus, assign it to a company location: open the catalog, choose Company location from the dropdown under the title, click Add a company location, select locations and click Done.

6. Set it to Active when you’re ready.

For hundreds of fixed prices, open the catalog, click Adjust prices, then Import CSV. The export only includes fixed prices, not percentage-priced products. Our guide to bulk editing Shopify prices safely covers checking a price file before you import it.

Two things change how prices add up:

  • Once a product has volume pricing, the catalog’s overall adjustment no longer applies to it.
  • Discounts apply on top of catalog prices. In a store with retail and wholesale customers, a discount set to All customers, Specific customers or Customer segments reaches both groups unless you assign it a B2B market.

How do you discount tagged customers without B2B?

1. Build the segment. Go to Customers, click Segments, then Create segment. Enter customer_tags CONTAINS 'wholesale' (use your own tag) and click Run query. Click Save segment, enter a name and click Save.

2. Create the discount. Go to Discounts and click Create discount. Choose Amount off products, then under Method select Automatic discount and enter a title.

3. Set who gets it. Enter the percentage. Under Eligibility, choose Customer segments and add your segment. Add a Minimum quantity of items if the rule had one.

4. Set combinations and save. Under Combinations, check only the discount classes this one should combine with, then save.

Each extra tier is another discount. Past a handful, an app or a Function is easier to keep right.

When do you need your own Function?

When the rules mix tags, quantities and products in ways no app handles, or you want code you own. Functions are code that changes how Shopify works out discounts, delivery and payments; in a custom app they need a Plus plan.

What to plan for:

  • Discount functions don’t see each other. Shopify says they “run concurrently, and have no knowledge of each other,” so rules one script handled together can now stack. Set combinations on purpose.
  • There’s a cap. A store can activate up to 25 discount functions.
  • Some places skip them. They don’t run on admin order edits or the Create Order API, and draft orders are only partly supported. Check how your team keys in phone orders.
  • Price changes and discounts are different jobs. If the old script lowered the line price itself, the lineUpdate operation in Shopify’s cartTransform Function API can override a line’s price. Only Plus stores and development stores can use apps with it.

Before you settle on a wholesale price, check it against your real Shopify margin after fees and shipping.

How do you check the new pricing works?

1. Pick a quiet hour. Customers can’t place live orders while Shopify Payments is in test mode.

2. Turn on test mode. Go to Settings > Payments, click Manage in the Shopify Payments section, select Enable test mode and click Save. Pay with the test card 4242 4242 4242 4242, any future date and any three-digit code. Shopify says simulated transactions don’t appear in payouts or reports.

3. Run every row of your rules table. Check out as:

  • A wholesale test customer, one unit of a product.
  • The same customer, one unit below and exactly at each quantity break.
  • A retail customer buying the same cart.
  • A wholesale customer with a discount code on top.
  • A draft order your team builds in the admin.

For B2B test orders, Shopify needs customer accounts turned on and a test company with a company location.

4. Compare with old orders. Each test line should match what the same cart paid before June 30, 2026.

5. Turn test mode off when you’re done, so real payments are captured.

6. Recheck after changes. Run the same carts whenever you add a discount, a pricing app or a catalog change.

Sources

Have one problem in mind?

Walk us through it on a free 30-minute call. Within two business days you get a one-page note on what we’d fix first, yours to keep.

Walk us through one problem