Shopify function to change shipping method

Topic summary

A Shopify Plus merchant needs to automatically select and display specific shipping options based on cart value thresholds:

Requirements:

  • Orders below $249 USD: Auto-select “PICK” shipping option (costs $8) and hide all other methods
  • Orders $249 USD and above: Auto-select “FREE” shipping option ($0 cost) and hide all other methods

Solution Approach:
Since Shopify Script Editor is being deprecated, the team is exploring Shopify Functions as the implementation method.

Recommended Solution:
Use the ShipRight app (built on Shopify Functions) with two conditional rules:

  1. Rule 1: Hide all shipping methods except PICK when cart total is below $249 (set Cart total Max to 249)
  2. Rule 2: Hide all shipping methods except FREE when cart total is $249 or above (set Cart total Min to 249)

The original poster requested detailed documentation examples from Shopify’s shipping discount functions API reference to better understand the implementation.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hi,

We are working for a Shopify Plus client and they have two shipping rates.

They want to get the shipping rate autoselected and hide other shipping options on the checkout page for the below two conditions.

If the price is below 249 USD apply the shipping option PICK which would cost 8 USD in shipping

If the price is above 249 USD they want to select the shipping option FREE which would cost 0 USD and hide other shipping options.

Since the script editor would not be used in the future can we use shopify functions to achieve the same?

Regards
Pankaj

Yes you can

Hi,

Can we get a detailed example for this link as well

https://shopify.dev/docs/api/functions/reference/shipping-discounts

Regards
Pankaj

Yes, you can achieve this using the ShipRight app which is built by Shopify Function. You need the below 2 rules to get it done:

  1. Create your first rule by adding all your shipping options (except PICK) in the Additional shipping methods field and in the Cart total Min (minimum) field, set the value to 249 like the below screenshot. This will hide all the shipping options except PICK if the order value is below 249 USD.
  2. Now create your second rule by adding all your shipping options (except FREE) in the Additional shipping methods field and in the Cart total Max (maximum) field, set the value to 249. This will hide all the shipping options except FREE if the order value is above 249 USD.

Hope it helps. Thanks.