Business Case: Suppose we have some products which are metallic in nature and some products which are liquid in nature. The liquids can be shipped only to rest of the countries. How can we formulate rules for that?
To tackle this problem, we categorize the products into shipping classes. In this case, Liquids and Metals can be taken as two shipping classes.
Step 1 : Creation of Shipping class
Go to admin ? Products? Shipping Classes? Add New Shipping Class
The below screenshot shows the above step.

Step 2: Configure shipping class for each product
Go to Product data tab and select Shipping ? Select Shipping class
Don’t forget top right) once you select the shipping class.
The below screenshot shows the above step.

Step 3: Create Shipping rules
Shipping rules help us to formulate rules for specific cases. In this case, we would be framing two shipping rules for liquids and metals as shown below.
Shipping rules can be created in the following steps :
- On the admin page go to Woocommerce ? Settings ? Select Shipping ? click on Shipping pro (shipping options)
- Based on convenience and requirement, select the columns you want for framing the business rules by tweaking Display/Hide Matrix.
- Frame the rules using shipping classes – liquids and metals.
- Based on the type of shipping calculation you want, select an option from the dropdown – calculation mode.
Since this is a simple case of shipping different products for different countries, I have framed 2 simple rules. More complex rules can be framed which can help us satisfy most of our shipping calculation needs.
Don’t forget ton!
The below screenshot displays simple rules framed in this case :-

Step 4: Verification – Check the rates in cart page
Shipping Class – Metals
We can see in the Cart , the only service is fetched for the shipping rule where shipping class is “Metals”

Shipping Class – Liquids
Service is fetched for the product with shipping class as Liquids and shipping address of country “Belgium”.

Voila! We just framed two rules to solve the case of “Different Product for Different Countries”!