Home › Forums › WC Vendors Free Support › Overide Product Form / Hide Categories for Specific Vendor. › Reply To: Overide Product Form / Hide Categories for Specific Vendor.
March 18, 2017 at 7:39 pm
#59374
brian
Participant
I have gotten this far. but run out of steam tonight:
BUT I cannot get the array_diff to knock out the value of the category, in this case 56, I cannot be too far out
add_filter(‘wcv_product_categories’, ‘custom_wcv_product_categories’);
function custom_wcv_product_categories( $args ){
print_r($args);
$args[‘exclude’][] = array_diff($args[‘exclude’][], [“56”]);
return $args;
}