I'm trying to convert this code to product_category:
add_filter('woocommerce_available_payment_gateways','filter_gateways',1);
function filter_gateways($gateways){
global $woocommerce;
foreach ($woocommerce->cart->cart_contents as $key => $values ) {
//store product id's in array
$highpriceditems = array(56,57);
if(in_array($values['product_id'],$highpriceditems)){
unset($gateways['paypal']);
break;
}}
return $gateways;
}
From this post