This reverts commit 76e68dddfd.
This commit is contained in:
Alba Rincón 2023-08-09 10:53:14 +02:00 committed by GitHub
parent d3fdc6d036
commit 9804a35596
1 changed files with 1 additions and 7 deletions

View File

@ -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' => '>',
);
}
}