Flexible Shipping plugin has a lot of useful features and allows setting up many complicated shipping scenarios. Unfortunately, sometimes it’s just not that simple. In this article, I’ll show you how to combine shipping classes in Flexible Shipping.
If you are reading this article, you are probably familiar with the Flexible Shipping plugin. Maybe you are looking for some solution for your shipping scenario or just want to know more about the plugin itself. Flexible Shipping is a useful table rate shipping plugin that allows you to set shipping costs based on weight, price, number of items, or product category.
Setting shipping costs based on shipping class is the most complex one. The main issue is that, if you set two shipping classes to one rule, it will be called only when products from BOTH shipping classes will be in the cart. In other words, if you add them both to one rule it won’t work as one OR another, but one AND another. This makes it a little more complicated to set up shipping rules for different products and combinations of them.
Let me show you an example to make it more clear. If you set the rules like that:
This rule will be called only when products from BOTH shipping classes “A” and “B” will be in the cart. If it’s only one of them, it will cause the “No shipping method available” message on the checkout page.
To correctly combine shipping classes from the previous example, you should set a separate rule for each shipping class:
This will work perfectly for both shipping classes separately. But what if your customer will have products from both of the shipping classes in the cart? I’ll show you how to set a shipping price in that situation. It can be a sum of both shipping costs or different values.
In that case, the shipping cost will be calculated based on your Rules Calculation set-up. It can be the sum of the rules, the highest cost, or the lower cost.
In this example, if you set it as Sum, the shipping cost for combined shipping classes will be $20. The reason for that is, that both rules (for both shipping classes A and B) are called. Both have a $10 shipping price, so as a sum, you’ll get $20.
You can also set the shipping cost for combined shipping classes as a different value. It’s much more complicated, but still possible with Flexible Shipping. To do that you have to follow these rules:
That’s enough of the theory. How to use it in your WooCommerce store and don’t make any mistakes in combining shipping classes in Flexible Shipping? Let’s go through a few examples of shipping scenarios.
First, something simple. For instance, let’s assume that shipping of product A costs $10. Product B is bigger, so shipping it costs $15. Shipping them together in one shipment costs $20.
To make it simpler, product A has a shipping class A, and product B has a shipping class B. It will be the same for all other examples and additional shipping classes. This solution will work only for shipping rules based on Shipping Class (When: Shipping Class). You can use the shipping classes with other options like weight and price, but it will work slightly differently. You can read more about it in our documentation.
For the second example let’s assume that shipping of product A costs $10. Product B is bigger, so shipping it costs $15. Shipping them together in one shipment costs $20. Shipping cost of product C costs $5, but shipping cost for combining it with product A or/and B will be without additional cost.
Combining shipping classes in Flexible Shipping plugin is a complex case, but with additional explanation, it gets much easier. I hope that this article will be helpful and solve common issues with setting your advanced shipping scenario. Remember that certainly, the most important rule from this article is if you set two shipping classes to one rule, it will be called only when products from both shipping classes will be in the cart.