diff --git a/includes/class-wc-query.php b/includes/class-wc-query.php index ad05e3d6c0a..66127445711 100644 --- a/includes/class-wc-query.php +++ b/includes/class-wc-query.php @@ -563,9 +563,8 @@ class WC_Query { } } - $product_visibility_terms = wc_get_product_visibility_term_ids(); + $product_visibility_terms = wc_get_product_visibility_term_ids(); $product_visibility_not_in = array( is_search() && $main_query ? $product_visibility_terms['exclude-from-search'] : $product_visibility_terms['exclude-from-catalog'] ); - $product_visibility_in = array(); // Hide out of stock products. if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) ) {