WooCommerce shipping classes – what it is and how to set up shipping by weight

WooCommerce shipping classes
Author Bartosz Gajewski
Reading time:
3 minutes read

WooCommerce shipping classes let you group products with the same properties. You can use them to group products that need to be handled with care. You could differ small, light products from the big, heavy ones. In this article I will teach you how to use WooCommerce shipping classes.

How to add WooCommerce shipping classes in your store?

You need to go to WooCommerce → Shipping → Shipping classes. You’ll find the Add shipping class button. Just click it to add a new one.

New fields will pop up. You need to enter:

  • Shipping class name – a name to easily distinguish classes.
  • Slug – if you don’t enter the slug it will be created automatically.
  • Description – is entirely optional and only visible in the admin area.

Add shipping class box

The slug is used as a reference to the shipping class in your database. For example you will see a slug while filtering products by shipping class in your store. In most cases you won’t be using them anyway.

Filter products by shipping class

That’s how I configured the shipping class:

Shipping class: Fragile

How to assign a shipping class to a product?

Once you have a shipping class or classes configured, you have to assign a shipping class to products. You can make it manually per product or you can edit a few products in bulk. I’ll show you both options.

Edit a single product

Go to the edit screen of a product simply by clicking the product name on the product list. Next go to the Product data metabox, click the Shipping tab and select the shipping class you want to assign.

Edit product: WooCommerce shipping class

You have to save the changes. That’s all!

Add shipping classes in bulk

Do you want to assign more than one product to a shipping class? Simply select the products (first step), select an Edit option (second step) and Apply the operation (third step).

Edit products in bulk - WooCommerce shipping classes

The new box will pop up. You have to select the shipping class you want your products to be assigned to.

Set Woocommerce shipping classes

Save the changes and you’re ready to go next.

How to set shipping cost based on WooCommerce shipping classes?

You wanted to configure WooCommerce shipping classes in your store for the purpose. You want the shipping cost to depend on the shipping classes of products in the customer’s cart. I’ll show you how to do it.

Flat rate

If you don’t know how to configure shipping methods, check out our WooCommerce shipping methods tutorial →

Once you configure WooCommerce shipping classes in your store, then a new section shows up on the Flat rate settings screen. It is called Shipping class costs and you can see this section on the screenshot below:

Flat rate Settings: Shipping class costs

You can set any cost for different shipping classes. The key option is the calculation type. I think that learning by example is the best way so I will show you how it works in practice.

I added two products to the cart. One of them is assigned to the Fragile shipping class, while the other isn’t assigned to any shipping class:

Products in cart differs in WooCommerce shipping classes (screenshot)

I will use this cart set as a reference.

Charge per class

Calculation type: per class

If you choose this option, you will charge for each shipping class individually. This means £5.00 base cost, £10.00 for a Beige Tote (Fragile shipping class) and £2.00 for Aliquam Consequat (no shipping class).

Calculation: per class - cart view

Do you see the calculation? The flat rate shipping method costs £17.00.

Charge per order

Calculation type: per order

If you choose this option, you will charge for the most expensive shipping class. This means £5.00 base cost and £10.00 for a Beige Tote (Fragile – the most expensive shipping class). The £2.00 cost for Aliquam Consequat will not be added to the calculation.

Calculation: per order - cart view (screenshot)

The Flat rate shipping method costs £15.00 now.

That’s all you have to know about Flat rate configuration. Set your prices and you’re ready to sell!

Shipping classes with Table Rate Shipping

Flat rate is not the only option. You can use Flexible Shipping – the table rate shipping plugin. In short, table rate shipping method is very useful when you sell products of different sizes and weights. If Flat rate is not enough for you, then Flexible Shipping is an answer to your needs.

Flexible Shipping WooCommerce

The best Table Rate Shipping for WooCommerce. Period. Create shipping rules based on weight, order totals or item count.

Download for free or Go to WordPress.org
100,000+ Active Installations
Last Updated: 2024-05-22
Works with WooCommerce 8.6 - 8.9.x

Just look at this video if you have never heard of this method:

Table rate looks like on the screenshot below:

Flexible Shipping table rate shipping classes

As you can see, you are able to use WooCommerce shipping classes in this method as well, however only in the PRO version (compare free and PRO versions). If you have never heard of table rate shipping, read about what is table rate shipping. It is the most flexible way to manage shipping methods and costs.

Are you ready to use WooCommerce shipping classes in your store?

In this article you have learned how to configure WooCommerce shipping classes in your store. I hope this knowledge will help you! If you have any concerns, just let us know in the comment section below!

To learn more about WooCommerce shipping, please make sure to read our Ultimate Guide to WooCommerce Shipping.

Notify of
Inline Feedbacks
View all comments
Olivier Colas
Olivier Colas
3 years ago

Hello, interested but do you know how I can ship or not the product regarding a zone : Example ? I want that product class (A) are not deliverable for this region (A) … ?

Łukasz Spryszak
Łukasz Spryszak
Reply to  Olivier Colas
3 years ago

Hi Olivier, if the product you don’t want to be delivered in the certain shipping zone has the A shipping class assigned, you should add this rule at the very top of the shipping cost calculation rules table for all the shipping methods available within this zone:

[Image no longer available]

Please mind that selecting the Cancel special action is essential in such case. It will result in hiding the shipping methods if the product with A shipping class is in the cart.

3 years ago

This is using Flat Rate. How can I implement this using Flexible Shipping?

Reply to  Ram
3 years ago

NVM, saw the option 🙂 using Pro

2 years ago

Can you use shipping classes to make certain shipping unavailable to certain products – for example could this be used to make a product only available for click and collect (not available for ‘royal mail shipping’ or ‘local home delivery’ if these are set as shipping methods)

Łukasz Spryszak
Łukasz Spryszak
Reply to  Kerryn
2 years ago

Hi Kerryn, to cut the story short – yes, it is possible to achieve with our Flexible Shipping PRO plugin. I believe that in your case you should have the Royal Mail shipping and Local home delivery methods handled by Flexible Shipping and Click & Collect e.g. by WooCommerce default Local Pickup. Then you need to assign e.g. the Unshippable shipping class to the products which are not supposed to be shipped. Once it is done, you should add the rule using the Special Action: Cancel hiding the methods handled by Flexible Shipping if the product with Unshippable shipping class is in the cart. It will result in showing only the Local Pickup if your customer puts in the cart a product which cannot be shipped. Here you can find a detailed guide how to set it up step-by-step: https://octolize.com/docs/article/45-flexible-shipping-disable-hide-shipping-method.

Last edited 2 years ago by Bartosz Gajewski

Check out our case studies

Dream Home Story
Furniture shipping via WooCommerce – Dream Home’s Case Study

Learn how to configure custom shipping rules for furniture orders – from heavy and bulky to small and light.

4 minutes read
Octolize Case Study
Vitrek’s Story

Read Octolize Case Study about Vitrek – a provider of innovative global solutions for High Voltage Test and Measurement.

2 minutes read
Octolize Case Study
EnglishSpeakingMum’s Story

Read Octolize Case Study about EnglishSpeakingMum – Polish dedicated and involved parenting blogger.

2 minutes read