WooCommerce 2.6 – Hide shipping methods when FREE SHIPPING is available
WooCommerce 2.6 brings major changes in the shipping module including the introduction of Shipping Zone.
These changes break the number of existing snippets including the snippet to Hide shipping methods when FREE SHIPPING is available.
This is because of minor changes in the way
$rates array is formed for the shipping method “Free Shipping”. Prior tored as
shipping_zone_instance_id is the shipping zone instance id of the shipping method.
Means, if the instance id of shipping zone is 1, the rates array key will be
free_shipping:1 and if instance id of shipping zone is 2, then the rates array key will be
free_shipping:2 and so on.