WooCommerce includes several core shipping methods, but you may need to extend your general shipping rules with the ability to add additional costs. If simple flat rate shipping won’t work for you, you should consider using the WooCommerce shipping classes.
Shipping classes will allow you to add classes to items or variations that can control how costs are calculated. For example, this can allow you to add shipping or handling surcharges for certain items in addition to your standard shipping costs.
They can be used with several shipping method types. As far as built-in options go, WooCommerce shipping classes can be used with the Flat Rate option, but they can also be used with the Table Rate shipping plugin, or other shipping plugins that take advantage of shipping classes. Some other shipping methods may also add their own information to the shipping classes options, such as FedEx classes to correspond to FedEx class codes.
There’s documentation on using shipping classes available, but we’ll walk through some sample use cases in this WooCommerce shipping classes tutorial so you can see how they’ll work throughout the purchasing and checkout processes, and how each cost option is calculated.
WooCommerce shipping classes: Basic setup
To use shipping classes, you’d first need to create some classes under Products > Shipping Classes. Add a class for any “criteria” that will add a cost. For example, if you’d like to charge a “freight” rate for oversized items, you can add a class for this. This can also be helpful for items that require rush shipping, insurance, or specialized packaging. Each class can add an additional shipping and/or handling fee.
Once you’ve added your classes, you can add them to products from the “Product Data” box under Shipping:
One of the best parts of this is that you can use different shipping classes for different variations. You can choose to adopt the parent shipping class, or change it for a particular variation. This can be great for adding a variation to “ship insured” or “ship with tracking” for a particular product: you can simply make this one of the purchasing options and add the right shipping class.
Once you’re done, you’ll then need to add the costs for your shipping classes for both shipping and handling. These costs will be applied if an item from the class is in the order based on the “Cost added” rules.
WooCommerce shipping classes: “Costs added” settings
This setting will be used to determine how the additional costs generated by these classes will be added to your WooCommerce orders. Here’s a quick explanation of how each cost option will be used. For each example, I’ll use the built-in Flat Rate shipping method with a base cost of $3.00 per order. My shipping class costs will be added on top of this $3 charge.
Base Flat Rate
Per order: Charge shipping for the entire order as a whole
If you select Per Order, any additional costs will be charged only once for the entire cart. If an item is in the cart and it contains one of your shipping classes, a single charge will be added to the order for the cost you’ve specified for that class. Quantity for the item can increase, but the fee will only be added to the cart once.
If an order contains items in more than one shipping class, only the highest charge will be added. For example, if one item has a shipping class that adds a $30 charge and another item is in a class that adds a $10 charge, only $30 will be added to the order total for shipping costs (on top of your flat rate and handling fees). This means that per order shipping is best if you only want the highest charge to be the one that’s added.
Sample Use Case: Insuring the shipping parcel
Let’s assume that some items that you ship will require shipping insurance, which should add a charge. In this example, I’m going to ship a mug, which we’d like to insure in case it breaks. The per-order total for my “insured” shipping class, which I’ve applied to the mug, will be $3.97. Notice that with a mug added to the cart, my total is $3 flat rate + $3.97 insurance fee to get $6.97:
Since this is a per-order charge because I only have to insure the package once, the shipping cost will remain the same, no matter how many mugs are ordered.
This can be handy if you have a couple of insurance classes — only the highest insurance class fee will be added to the order. If you’d want a fee added for each insurance class, check out Per Class additions below.
Per item: Charge shipping for each item individually
Selecting Per Item will add a charge for every single item in a shipping class. The charge is added on a per-item basis, so adding additional quantities of an item will add an extra charge for each item that’s added to the cart. If you have items from different shipping classes, the charge will be added for each item.
For example, let’s return to the case above where items with a $30 shipping class fee and a $10 shipping class fee are added to the cart. With this setting, the total shipping fee addition will be $40, and will increase if the quantities of the items are increased.
Sample Use Case: Freight item shipping
If you’re shipping freight items, you may want a class that adds a shipping fee for each of these items, as these are expensive shipping costs you probably don’t want to absorb. Each time and item with this shipping class is added to the cart, the order total will increase as the shipping class fee is added.
Let’s use a “Freight” class item, which should add a $30 shipping fee and a $5 handling fee on a per item basis. If one of these is added to my cart, the base $3 fee will have $35 added to it:
If I increase the quantity of the item, $35 will be added for each quantity increase.
Per class: Charge shipping for each shipping class in an order
Per class shipping cost addition is like a blend between the first two methods. The shipping class fee will be added if an item from the class is in the cart, but will only be added once, regardless of item quantity. The difference between per order and per class cost additions is that per order fees are only ever added once: the highest fee is used. Per class fees will add a fee for each class in the cart, not just the highest one.
If I have a item in a class with a $30 fee and an item in a class with a $10 fee added to my cart, $40 will be added to my shipping total. I can increase the quantities of the items I’m ordering, but the total fee will remain the same since it’s only added once per class.
Sample Use Case: Hazardous materials or perishable goods
Let’s assume you’re selling women’s accessories and jewelry. If you sell perfume above 30mL, you’d need to abide by hazardous shipping standards in your packaging since the item is flammable. This will only affect your packaging once, regardless of how many perfume containers are ordered, so you only want to assess this fee if a Hazmat article is in the cart.
However, you may want to then also charge if insurance is needed (for example, on a high-end jewelry item). If you’d used a “per order” basis for costs, only the higher cost would be used. Per class will instead add a fee once each time a new shipping class (i.e., Hazmat and Insurance) is present in the cart.
I’ve also seen this used for perishable food goods to add a cost to the order if a cooler or similar will be needed for packaging, as the cooler would only be required once when a perishable item was ordered.
Here’s what it would look like in action: if items from different shipping classes are added to the cart, notice that the fee per class is added once to the shipping total. In the example below, my $3 flat rate fee will have $35 added for my “freight” class, and $3.97 added for the “insured” class.
Increasing the item quantities will not change the total shipping costs. However, the cost will increase if an item from a different class is added to the cart.
Per order and per item fees are typically used when your shipping classes are adding costs for one thing, such as a tiered insurance fee or a per-item “heavy shipping” fee. Per class fees are helpful if you’ll have classes doing different things, and you need to charge once for each class if an applicable item is in the cart.
The downside to using shipping classes is that you can’t determine how to add costs on a per-class basis. For example, you can’t set rules for each class, i.e., “Freight” rates should be added per item, but “Insured” rates are per order.
If you need this sort of fine-grained control, I recommend using something like Table Rate Shipping rather than the core Flat Rate shipping so you can tailor shipping rates a bit more to your shop catalog.