I get quite a lot of requests from customers who want to know how they can apply free shipping to just a few specific products when using WooCommerce.
Often, they’ll sell their usual collection of items but have one or two that they’re happy to ship for free, like a sticker or badge.
There are a few ways to achieve this, ranging from simple to complicated, which I’ll talk a bit about today.
The first way that I always recommend, as is often the easiest, is to set the specific products to be Virtual, like you would a downloadable file.
This tells WooCommerce that the product doesn’t need to be shipped, thus giving the productfree shipping. If someone adds both this item and a ‘paid shipping’ item to the cart, it will charge them shipping.
There is one caveat though, but it’s not the biggest deal. If it’s just a virtual product in the cart, WooCommerce won’t allow the user to use a different shipping address.
However! I found a way around this. Simply add the following code to the ‘custom functions’ area of your functions.php file:
WooThemes offer a really handy and powerful extension, Per-Product Shipping, that allows you set complex per-product shipping rules.
Code all the things
If you want to get your hands messy or something like that, use the following code:
You’ll need to change the product IDs to be those of the products you want to apply free shipping to. If you need help finding the product IDs, you probably shouldn’t use the code but anyway, this will help.
But what about free shipping based on shipping classes? Patrick just wrote a post explaining that! Check it out.
On the other hand, if you’d like to learn how to disable free shipping on certain products, please check out Patrick’s detailed post about it.