Exclude a WooCommerce product category from a WP_Query
问题 I've got the following args defined as a part of my query: $args = apply_filters('woocommerce_related_products_args', array( 'post_type' => 'product', 'author' => $artist, 'post_status' => 'publish', 'meta_query' => array( array( 'key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN' ) ) ) ); $products = new WP_Query( $args ); I need to exclude a category called Magazines (slug "magazines") or ID 351 from the query. I've been trying to include 'category__not_in' =>