WooCommerce How to Hide Shipping Calculator when Free Shipping is Selected

Note: This tutorial requires knowledge of WooCommerce Template customization. If you are not aware of it, here is the documentation from WooThemes.

Below code replacement is part of WooCommerce template file: woocommerce/cart/cart-shipping.php

Replace this code


woocommerce_shipping_calculator(); 

With this


if(strpos($chosen_method, "free_shipping",0) !== false)
{
  // Here goes any customization required for Free Shipping Method
}
else
{
   woocommerce_shipping_calculator(); 
}

Note: This code is tested for WooCommerce Version 2.6.4

1 thought on “WooCommerce How to Hide Shipping Calculator when Free Shipping is Selected”

Leave a Reply

Your email address will not be published.