As per the official documentation:
If free shipping is enabled customers will have access to free shipping on their orders. You can however specify a few conditions they must meet to be granted free shipping such as;
- Minimum order amount
- Coupon (Users will need to enter a valid free shipping coupon code to use this method. If a coupon is used, the minimum order amount will be ignored)
- You can also choose specific countries to which free shipping is allowed.
Further, the free shipping method has an is_available function which can be hooked into:
return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', $is_available );
This means you can use add_filter()
on woocommerce_shipping_free_shipping_is_available
and return true
or false
.