Created
November 26, 2014 09:43
-
-
Save pipoulito/cc40bf49ed14431d7e33 to your computer and use it in GitHub Desktop.
Revisions
-
pipoulito created this gist
Nov 26, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ Hi ! 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); print_r($rates); return $rates; } add_filter( 'woocommerce_available_shipping_methods','hide_table_rate_shipping_when_free_is_available' , 10, 1 ); function hide_table_rate_shipping_when_free_is_available( $available_methods ) { mail('mymail', 'yo', $available_methods); print_r($available_methods); return $available_methods; } thanks