Спасибо!
Получается условно можно так примерно сделать?
add_filter(‘me_exclude_post’, function ($products) {
$excluded_categories = array(‘no-use-cat’, ‘any-category’);
return array_filter($products, function ($product) use ($excluded_categories) {
$product_categories = wp_get_post_terms($product['id'], 'product_cat', array('fields' => 'slugs'));
return empty(array_intersect($excluded_categories, $product_categories));
});
});