Skip to content

Instantly share code, notes, and snippets.

Hi !
i use woocomerce 2.112 so i tried these two different ways in my function.php but it nothing is called.
I need to hide my local_pickup options defined in my table rate plug setting if my contains a product with shipping class=="XX"
Please, I'm lost , thanks a lot
add_filter( 'woocommerce_package_rates', 'hide_shipping_when_free_is_available', 10, 2 );
function hide_shipping_when_free_is_available( $rates, $package ) {
mail('myemail', 'yo', $rates);