Hide a Shipping Method if Certain Items are in the Cart Together
Overview
Some merchants want to prioritize shipping for certain products via specific carriers or shipping methods. For instance, if Product A is eligible to ship via USPS Media Mail and Product B is a non-Media Mail item, you'll need a way to handle a shipping scenario where both are present in the cart. To prevent issues, you'll need two shipping rules. The first rule hides the Media Mail method when Non-Media Mail shipping group items are in the cart. The second hides UPS Ground when Media Mail is in the cart by itself.
Requirements
This setup assumes you're not restricting your shipping groups to specific carriers directly. Instead, your Shipping Rules manage the Carrier for the Shipping Groups. This scenario doesn't apply if restrictions are on the Shipping Groups themselves.
Setup
This example is for a company with a shipping group Media Mail that prioritizes using the USPS Media Mail shipping method and another group, Non-Media Mail, thats unable to use Media Mail and thus uses UPS Ground. When these items are together UPS Ground will handle shipping. Here's how to set it up:
- Go to Shipping Rules and click the +New button.

- Select Hide Methods as the rule type.

- In the Shipping Methods section, select ALL carriers except the one you wish to use (e.g., UPS Ground).

- Set Conditions to require that All selected Shipping Groups are in the Cart. Choose Non-Media Mail in the shipping groups list.

- Add a title for the new rule so it's easy to identify.

- Click “Finish” to save the rule. This applies it immediately.
- Go to Shipping Rules and click the +New button.
- Select Hide Methods as the rule type.

- In the Shipping Methods section, select ALL carriers except the one you wish to use (e.g., USPS Media Mail).

- Set Conditions to All selected Shipping Groups are in the cart and select Media Mail. You'll set the additional condition Shipping Groups to prevent this rule from applying and choose Non-Media Media Mail in the shipping groups list.

- Add a title for the new rule so it's easy to identify.

After creating the rule, we recommend using the “Test your Rates” feature to confirm it works as intended. The configuration results in UPS Ground Shipping being offered when these specific groups are together. If the products are separate, their assigned shipping methods apply.
Assign Products to Shipping Groups
Before testing, ensure you assign your products to the new shipping group.