WooCommerce · Guide
How to Use Shipping Classes in WooCommerce: A Beginner's Guide

Short answer
Create a class under WooCommerce > Settings > Shipping > Classes, then assign it to products in the Shipping tab of the Product data box. Finally, edit the Flat rate method in each shipping zone and enter a cost for that class. Choose Per class or Per order to control how mixed carts are charged.
Key takeaways
- Shipping classes group products that cost more or less to ship.
- Classes only change prices when a Flat rate method has class costs set.
- Assign classes per product, per variation, in bulk edit or by CSV.
- Per class adds each class cost once; Per order charges only the most expensive class.
- Use the [qty] placeholder to charge per item within a class.
- Free shipping and Local pickup ignore shipping classes.
What are shipping classes in WooCommerce?
Shipping classes are labels you attach to products so you can charge different shipping costs for groups of items, such as heavy, bulky or fragile goods.
On their own, classes do nothing. They only change prices when a shipping method, usually Flat rate, has a cost set for each class.
A simple example helps.
A store sells posters and framed prints. Posters ship cheaply in tubes, but frames need large boxes. By putting frames in a Bulky class, the store can add a higher shipping cost only when a frame is in the cart.
WooCommerce documents the feature on its product shipping classes page. Classes work together with zones, which decide where you ship. If zones are new to you, read our explainer on WooCommerce shipping zones first.
When should you use shipping classes?
Use shipping classes when some products cost noticeably more or less to ship than the rest, and a single flat rate would either overcharge or undercharge customers.
Good reasons to create classes:
- Heavy or bulky items such as furniture, large prints or equipment.
- Small, light items like stickers or digital add-ons that ship in an envelope.
- Fragile goods that need extra packing.
- Items with a special carrier, such as freight or cold shipping.
If all your products ship at about the same cost, you may not need classes at all. A single flat rate or free shipping above a set order value is simpler to manage.
How do you create a shipping class?
Go to WooCommerce > Settings > Shipping > Classes, add a new class with a name and an optional slug and description, then save.
Step by step:
- In your dashboard, go to WooCommerce > Settings.
- Click the Shipping tab.
- Open the Classes section.
- Click the button to add a shipping class.
- Enter a name, such as Bulky.
- Leave the slug blank to generate it automatically, or type your own.
- Add a short description so other staff know what it is for.
- Save the class.
Repeat for each group you need. Most stores need only two or three classes. Too many classes make costs hard to manage.
How do you assign a shipping class to a product?
Edit the product, open the Shipping tab in the Product data box, choose the class from the dropdown and update the product.
For a single product:
- Go to Products and edit the product.
- Scroll to the Product data box.
- Click the Shipping tab.
- Choose your class from the Shipping class dropdown.
- Click Update.
Variable products can have a different class per variation. Each variation has its own shipping class setting, which defaults to Same as parent. That is useful when, say, a large size needs a bigger box.
To assign classes to many products at once, select them on the Products list, choose Edit from Bulk actions, and set the shipping class in the bulk edit panel. You can also set classes in a CSV import. Our guide on exporting WooCommerce products shows the CSV format.
How do you set shipping costs for each class?
Open a shipping zone, edit its Flat rate method, and enter a cost for each shipping class in the class costs section that appears once classes exist.
The steps:
- Go to WooCommerce > Settings > Shipping.
- Click the zone you want to edit, such as Domestic.
- Edit the Flat rate method, or add one.
- Set the base Cost that applies to every order.
- Under Shipping class costs, enter a cost for each class.
- Set No shipping class cost for products without a class.
- Choose a Calculation type.
- Save.
The base cost and class cost add together. If the base is 5 and the Bulky class cost is 15, an order with one bulky item pays 20 for shipping.
Do this for each zone where you use Flat rate. Classes can cost more for international zones than for domestic ones. The Flat Rate Shipping documentation lists every field.
What is the difference between Per class and Per order?
Per class charges the class cost once for each different class in the cart, while Per order charges only the most expensive class cost once.
This setting changes totals a lot for mixed carts. Here is an example with a base cost of 5, Small class at 2, and Bulky class at 15:
| Cart contents | Per class total | Per order total |
|---|---|---|
| One small item | 5 + 2 = 7 | 5 + 2 = 7 |
| One bulky item | 5 + 15 = 20 | 5 + 15 = 20 |
| One small and one bulky item | 5 + 2 + 15 = 22 | 5 + 15 = 20 |
| Two bulky items | 5 + 15 = 20 | 5 + 15 = 20 |
Notice that quantity does not change these totals. A class cost is charged once per class, not once per item, unless you use the [qty] placeholder.
Pick Per class when different classes really ship in separate parcels. Pick Per order when everything goes in one box and the bulkiest item sets the price.
How do you charge per item with shipping classes?
Use the [qty] placeholder in the class cost field, for example 10 * [qty], so the cost multiplies by the number of items in that class.
Flat rate fields accept simple formulas. The most useful placeholders are:
- [qty] is the number of items in the cart, or in that class when used in a class cost.
- [cost] is the total price of those items.
- [fee] adds a percentage fee, with optional minimum and maximum amounts.
For example, a Bulky class cost of 10 + (5 * [qty]) charges 10 for the first bulky order plus 5 per bulky item. Test the result in your cart before going live.
Developers who need rules beyond formulas can build custom methods with the WooCommerce shipping method API. The source code for the built-in Flat rate method is in the WooCommerce GitHub repository if you want to see exactly how formulas are parsed.
Do shipping classes work with free shipping and other methods?
The built-in Free shipping and Local pickup methods ignore shipping classes, so classes mainly affect Flat rate and some extensions such as Table Rate Shipping.
If a zone offers both Flat rate and Free shipping, customers who qualify for free shipping can still choose it even with bulky items in the cart. To exclude certain classes from free shipping, you need an extension or a small code snippet.
Paid extensions such as Table Rate Shipping can use classes together with weight, item count and price. That suits stores with complex rules. Our guide on changing shipping rates in WooCommerce compares the main options.
How do you test your shipping class setup?
Add products from each class to the cart as a guest, enter addresses in each zone, and check that the totals match your plan.
Test these cases at least:
- One product with no class.
- One product from each class.
- A mixed cart with two or more classes.
- Several of the same item, if you use [qty].
- An address in each zone you ship to.
If no shipping options appear at all, an address may fall outside every zone, or a method may be missing. Our guide to fixing “no shipping options available” walks through those causes.
What are common shipping class mistakes?
The most common mistakes are forgetting to set class costs in every zone, leaving products unassigned, and choosing the wrong calculation type.
Watch out for these:
- Missing class costs. A class with no cost in a zone adds nothing there.
- Unassigned products. New products default to no class, so they use the No shipping class cost.
- Variation overrides. A variation set to a different class can surprise you in the cart.
- Too many classes. Each class needs a cost in every zone, which multiplies upkeep.
Review classes whenever you add a new product line or a new zone. If you later print labels from WooCommerce, accurate classes and weights also help. Our guide to printing shipping labels covers that next step.
WooCommerce itself is free from the WordPress plugin directory, and shipping classes are part of the core plugin, so you do not need an extension to use them.
Frequently asked questions
Are shipping classes free in WooCommerce?
Yes. Shipping classes are part of the core WooCommerce plugin, along with shipping zones and the Flat rate method. You only need a paid extension for more complex rules, such as combining classes with weight or hiding specific methods for certain classes.
Can a product have more than one shipping class?
No. Each product, or each variation of a variable product, can have only one shipping class. If an item needs different rules in different situations, use variations with their own classes or a table rate extension that combines classes with other conditions.
Why is my shipping class cost not being added?
The zone used for the customer's address may not have a cost set for that class, the product may not have the class assigned, or the customer may be choosing Free shipping. Check the Flat rate settings for the matching zone and the product's Shipping tab.
Do shipping classes affect shipping by weight?
Not in core WooCommerce. Flat rate does not use product weight, and classes are just labels. To charge by weight, use a table rate or weight-based shipping extension, which can also use shipping classes as part of its rules.
How do I remove a shipping class from products?
Edit the product, open the Shipping tab and set the class back to No shipping class. For many products, use Bulk actions and Edit on the Products list. Deleting the class in settings also removes it from all products that used it.
Sources
- Product Shipping Classes WooCommerce
- Flat Rate Shipping WooCommerce
- Shipping method API WooCommerce Developer Docs
- WooCommerce source code GitHub
- WooCommerce plugin WordPress.org Plugin Directory
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


