Last active
May 31, 2016 03:50
-
-
Save WooForce/693d625e9ea85dbbfc441fb4fdab9a4f to your computer and use it in GitHub Desktop.
FedEx and USPS - Skip product from shipping package
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 characters
add_filter('wf_shipping_skip_product','skip_my_products',10,3); | |
function skip_my_products($skip = false, $product, $package){ | |
$shipping_free_classes = array(16); // array of shipping class ids to exclude from cart | |
$shipping_class = $product['data']->get_shipping_class_id(); | |
if(in_array($shipping_class, $shipping_free_classes)){ | |
$skip = true; | |
} | |
return $skip; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment