From 9804a35596d2e98ded1bc42a7115d31d96de2d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Wed, 9 Aug 2023 10:53:14 +0200 Subject: [PATCH] Revert "Show only products with rating (https://github.com/woocommerce/woocommerce-blocks/pull/10434)" (https://github.com/woocommerce/woocommerce-blocks/pull/10512) This reverts commit 76e68dddfd25b828de3518112b2bad0c91ec7a05. --- .../woocommerce-blocks/src/BlockTypes/ProductTopRated.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/woocommerce-blocks/src/BlockTypes/ProductTopRated.php b/plugins/woocommerce-blocks/src/BlockTypes/ProductTopRated.php index 88503d0a49a..db3cfbc7b39 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/ProductTopRated.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/ProductTopRated.php @@ -14,17 +14,11 @@ class ProductTopRated extends AbstractProductGrid { protected $block_name = 'product-top-rated'; /** - * Show only products with ratings and order by rating. + * Force orderby to rating. * * @param array $query_args Query args. */ protected function set_block_query_args( &$query_args ) { $query_args['orderby'] = 'rating'; - - $this->meta_query[] = array( - 'key' => '_wc_average_rating', - 'value' => 0, - 'compare' => '>', - ); } }