This article with help you show or hide Free shipping based on item count for your domestic shipments. We will take the example of one of our customers who has to create a comic book e-commerce website. Read along to know more about it.
John was creating a comic book e-commerce site and wanted to set up free shipping within Australia only for customers who buy 12 or more comic books.
We created a code snippet as below that enables to show/hide Free Shipping based on item count for domestic shipment:
In the above code, alter the number in the variable ($minimum_number_of_item = 12;) to change the number of items you want to be in the cart to offer free shipping.
Also alter the variable for country code ($shop_country = ‘AU’;) as applicable.
Here are two screenshots to show how the snippet works:
Check out our amazing plugins,
- WooCommerce UPS Shipping plugin
- WooCommerce FedEx Shipping plugin
- WooCommerce Canada Post Shipping plugin
- WooCommerce Multi-Carrier Shipping plugin
- WooCommerce Table Rate Shipping Pro plugin