Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Revert "Show only products with rating (#10434)" (#10512)
Browse files Browse the repository at this point in the history
This reverts commit 654f405.
  • Loading branch information
albarin authored Aug 9, 2023
1 parent f62fd44 commit 8cda634
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/BlockTypes/ProductTopRated.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '>',
);
}
}

0 comments on commit 8cda634

Please sign in to comment.