How can I modify the code bellow to include multiple product ids ?
add_filter('woocommerce_is_purchasable', 'my_woocommerce_is_purchasable', 10, 2);
function my_woocommerce_is_purchasable($is_purchasable, $product) {
return ($product->id == 100 ? false : $is_purchasable);
}
Thanks
2
Answers
Maybe something like this:
Try this: