WooCommerce: Assign Free Shipping to a Single Product
Believe it or not, the answer to this very frequent question is inside the WooCommerce settings… so don’t worry too much about coding if you’re not a developer or purchasing yet another premium WooCommerce plugin!
From the WooCommerce shipping rates, you can select “Free Shipping” as a method but that would apply to ALL products – so how do you override the shipping settings and allow a single product to have free shipping, while keeping all the others on a Flat rate?
1. Create a Shipping Class
From the WordPress dashboard, go to WooCommerce > Settings > Shipping > Shipping Classes > Add Shipping Class. Call it “Free Shipping” or whatever you like.
2. Assign the new Shipping Class to your Product
Edit the product that requires free shipping by going to Product Data > Shipping > Shipping Class and assigning the “Free Shipping” shipping class to it. Update the product (if you go back to the admin page WooCommerce > Settings > Shipping > Shipping Classes, you should now see a “1” under “Product Count”).
3. Set up a Flat Rate based on Shipping Class
Go to WooCommerce > Settings > Shipping > Shipping Zones. In each zone you should have at least 1 Flat Rate. Edit each Flat Rate, and make sure:
Cost is $0
“Free Shipping” (or whatever you called the custom shipping class) class cost is $0
“No shipping class” cost is whatever it would be for other products
“Charge per class” is enabled
Now if the product is in the cart and you’ve set up things properly, shipping will be free (unless there is a product with no shipping class as well, in which case its rate will trigger instead).
WooCommerce: “You Only Need $$$ to Get Free Shipping!” @ Cart This is a very cool snippet that many of you should use to increase your average order value. Ecommerce customers who are near the “free shipping” threshold will try to add more products to the cart in order to qualify for free shipping. It’s pure psychology. Here’s how we show a simple message on the […]
WooCommerce: Weight-Based Shipping Methods With WooCommerce you get 3 default shipping methods: Flat Rate, Free Shipping, Local Pickup. For each one you can define a cost, however there is no way to set up some “weight” restrictions. So, what if you want to display a rate for orders below 10 kg, and another shipping rate for orders above that […]
WooCommerce: Hide Shipping Method If Shipping Class Is In The Cart Our goal is to check if a Product with a specific Shipping Class is in the Cart, and consequently disabling a shipping rate such as Free Shipping if this is true. This is super useful when there are multiple items in the cart and you don’t want to give free shipping for certain orders for […]
WooCommerce: Hide Shipping Rates if Free Shipping Available If Free Shipping is available, you possibly don’t want to show the other premium shipping options. WooCommerce shows by default all shipping rates that match a given shipping zone, so it’s not possible to achieve this from the settings alone. Thankfully, the “woocommerce_package_rates” filter allows us to manipulate the shipping rates before they are returned […]
Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli