Show/Hide Free Shipping Based on Item Count for Domestic Shipment

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.

Show/Hide Free Shipping


Here are two screenshots to show how the snippet works:

Show/Hide Free woocommerce Shipping

Check out our amazing plugins,

Leave a Reply