WooCommerce provides some good options that help you offer flexible shipping to your customers. Shipping classes are ones of those. Today, we are going to learn the in and out of WooCommerce Shipping Classes and how we can use those classes to create flexible shipping methods for our store.
What are WooCommerce shipping classes?
In short, WooCommerce shipping classes are a way to group similar products to have one shipping method and fee. For example, you have a store selling furniture. While decoration items like vases, lamps don’t cost much space when packing, tables and chairs do. So, you may want to group vases, lamps in one shipping class called small items and tables and chairs in another class, called large items.
You can then setup different shipping calculation for each class. For example, you want to set the shipping cost for small items to a flat rate at $2 and shipping cost for large items to a flat rate at $20. You can achieve this quite easily with WooCommerce shipping classes.
How to create shipping classes in WooCommerce
Creating shipping classes is very simple in WooCommerce. All you need to do is to go to WooCommerce->Settings->Shipping->Shipping classes:
As you can see, we don’t have any shipping classes yet. Let’s click on Add shipping class button and add two shipping classes: small items and big items:
Finally, click on Save shipping classes to save. You have successfully created two shipping classes.
How to use WooCommerce shipping classes
To use the shipping classes, first you need to assign them to the appropriate products. We are going to assign the small items class to a vase and big items class to a table. Let’s go to Products->All products and click on the Edit link under the product we want to assign the shipping class to:
Let’s scroll down to Product data section, click on shipping and click on the shipping class select box:
Then choose the appropriate shipping class for the item. As we are editing the table, let’s select big items. Now, update the product.
You have successfully assigned a shipping class to a product. Make sure you do the same with the vase.
Our products now have shipping classes. However, there isn’t any change in shipping fee applied. That’s because shipping classes are part of shipping methods under a specific shipping zone. Let’s go configure the rules for our shipping classes.
Configure conditions for shipping classes
Let’s navigate to WooCommerce->Settings->Shipping->Shipping zones
Shipping classes can only be configured as a part of shipping method, and shipping methods are children of shipping zones. So, if you have multiple shipping zones, you need to configure shipping classes’ rules for each zone. For example, you can set the shipping fee for big items to $30 for customers who have UK address and $60 for customers who have Australia address.
Sounds confusing? Let’s have an example to clear the muddle. Let’s say we are going to set the shipping fee of big items in Australia to $60.
First, click on the edit link under Australia shipping zone:
Then, click on add shipping method:
Select flat rate and click on add shipping method. Then click on the Edit link under the flat rate shipping method we have just added:
There are three fields you need to pay attention to:
- The cost field: This is the base cost of the shipping method. The shipping cost for the item will be the sub of this field and its shipping class cost.
- “big items” shipping class cost: This is the cost of products which has big items shipping class (under a specific shipping zone and shipping method)
- “small items” shipping class cost: This is the cost of products which has small items shipping class
- No shipping class cost: You can set the shipping fee for items that don’t have any shipping class. We are going to leave this field blank. That means such items will have the shipping cost equal to the base cost ($10).
- Calculation type: You can have two options: per class and per order. If you choose per class, the shipping cost will be the total cost of all shipping classes of the items in cart. Thus, if we have one big item and one small item, the shipping cost will be: the base cost + big items shipping class cost + small items shipping class cost. However, if you choose per order, the shipping cost will be: the base cost + big items shipping class cost (since big items shipping class is the most expensive).
We are going to set the base cost is $10, $60 and $5 for big items and small items accordingly. For calculation type, let’s select per class. Then, click on save changes.
Make a test order to see shipping classes in action
We are going to order one vase and one table. Then, go to the cart page:
Now, look at the cart total:
You can see the shipping cost is $75. That’s be cause we have $10 as the base shipping cost, $60 for the “big items” class (the table/desk) and $5 for “small items” (the vase).
$10 + $60 + $5 = $75
As mentioned above, there are two ways to calculate the shipping class cost in one order: per class or per order. We have $75 here because we select per class. If we now change to per order, you will see the shipping cost changes too:
As you can see now, the shipping cost is now $70. That’s because it’s equal to the base cost + most expensive shipping class, which is “big items” ($60).
Flexible shipping with shipping classes
Using shipping classes can offer much for flexibility that just setting a fix number. Let’s consider some scenarios to see how shipping classes can help you provide flexible shipping options for your customers.
Set shipping cost per product
For example, you don’t want to charge a fix amount per item in cart. Instead, for “small items” shipping class, you want to charge $0.5 per item. Thus, if one customer orders 10 items, his total shipping cost will be $0.5 * 10 = $5.
Let’s set that up by going to WooCommerce->settings->Shipping zones and edit a shipping method:
This is the settings we have done previously. Now, in the small items shipping class cost box, enter [qty] * 0.5.
Then, go to our cart and update the cart to have 10 vase and remove the desk.
Now, if you look at cart total, you’ll see our shipping cost is now $15:
That’s because the shipping cost = $10 (base cost) + 10 * 0.5 = $15.
It’s really flexible, isn’t it?
Set shipping cost as a percentage of item total cost
You can also set the shipping cost as a percentage of item total cost. For example, the shipping cost for “small items” shipping class is 5% of the cost of all “small items” in cart. You can set that up by doing so:
Now, if you go to our cart (still have 10 vases), you’ll see the shipping cost is now $25:
That’s because 10 vases cost $300 ($30 per vase). 5% of $300 is $15. The total shipping cost would be: $10 (base cost) + $15 = $25.
Set the minimum and maximum amount for the shipping fee
After setting the fee as a percentage of items total, you can set the minimum and maximum cost for that shipping class. For example, I want to set the minimum shipping cost for “small items” is $20 and maximum $50. You can do it like so:
Now, with still 10 vases in our cart, if we refresh the cart, you will see the shipping fee is now $30, instead of $25. That’s because the minimum fee is $20 plus base cost ($10) = $30.
If you update the cart to buy 100 items (that is $3000 total and 5% * $3000 = $150), the shipping cost would be $60:
That’s because our percentage based fee now is $150, exceeds the $50 maximum fee. Thus, the customers will get the maximum shipping fee $50 + $10 (base cost) = $60.
As you can see, WooCommerce shipping classes can be very powerful when setting up your shipping cost. You can set a fix amount per class. You can also set the shipping cost as a percentage of items total. Hopefully, the post has been helpful to you.
Does this post solve your shipping questions? If not, leave a message. In the mean time, make sure you checkout table rate shipping tutorial. I wrote an extensive tutorial there for people who need complex shipping structure.
Get Quality WooCommerce Tutorials Delivered To Your Emails Daily
No spam, only quality content