Hi,
You previously provided this code that would remove certain ‘product categories’ from being selected:
function wcmp_filter_product_cat_query_args_callback( $args ) {
if ( !isset( $args['taxonomy'] ) && $args['taxonomy'] != 'product_cat' ) return $args;
// add your term_ids within follows array that you want to exclude from vendor product categories list
$args['exclude'] = array( 35905, 37037, 36883,39003,39004); // lets assume 12 & 15 term_id want to exclude from vendor
return $args;
}
add_filter( 'wcmp_get_product_terms_product_cat_query_args', 'wcmp_filter_product_cat_query_args_callback', 99 );
Copy
It no longer works. Please can you provide updated code.
For clarity, I want to prevent the above product categories from showing on the ‘add product’ page for vendors (see https://ibb.co/2tPMxCY)
Thanks