This document will explain how you can setup a scenario where only a part of the order receives free shipping. For example when giving a product for free when purchasing another, or simply allowing to ship a portion of the order free when ordering other items.
This setup also works great when using live shipping carrier rates and you don’t want to calculate shipping for a part of the order.
All configuration happens at the
WooCommerce >
Settings >
Shipping >
Packages settings section.
For the setup of providing free shipping on a part of the order you’ll want to create at least two packages. The first package is to hold the free shipping products, the other is for the remainder of the products (this doesn’t have to be a single package, this can of course also be multiple packages).
The conditions needed depends on your own requirements. I’ll give two example configurations. Make sure to adjust these to your own requirements.
Scenario 1: Products with shipping class get free shipping
We start off by creating a ‘free-shipping’ shipping class. This will be assigned to any/all products you’d like to have free shipping.
For the package we’re going to make use of the ‘Contains shipping class’ conditions in both the top and lower conditional section of the plugin.
Both conditional sections use the same condition here; you only want this package to appear when a product with the ‘free shipping’ shipping class is in the cart, and only put those products inside the package.
Next up is setting up a Free shipping rate in the shipping zone(s) that you need this available in. This can be just a regular free shipping rate from WooCommerce.
In the shipping package, click on the rotating icon, making the ‘Exclude’ option a ‘Whitelist’ instead. Select the ‘Free shipping’ option from the dropdown, and if needed for your shop, any other option you’d like to have available (e.g. a priority option).
Scenario 2: Free shipping for Product X when purchased with Product Y
This setup is slightly different from the setup with shipping classes, but the essentials remain the same.
In the top section of the plugin you’d want setup the condition so that the package is only created when both products X and Y are in the cart. This can be done using the ‘Contains product’ condition. In the second conditional section, you only need to select which products you’d want to place in the package, in this case Product X only.
Â
(If you want to add multiple products, remember to use the ‘Add OR group’ instead of adding ‘AND’ based conditions. Having two ‘Product’ conditions in one condition group here will not match any products and thus not work.)
Similar to the 1st scenario, whitelist the free shipping method on this package.
This package is being created / setup in order to remove the free shipping option from the list of available options so we’re not giving free shipping to both packages / the entire order.
The setup for the package can be done similarly as described in the documentation on
how to setup a fallback shipping package.
A setup like this target all ‘other’ products in the cart. Do make sure this package is sorted last in the packages overview.
Â
Tip: The
Smart Coupons plugin offers the ability to provide add a free product to the cart with a coupon, this works perfectly together with the free shipping package if you also want to provide free shipping for that product.