Automattic\WooCommerce\Internal\Admin\ProductReviews
ReviewsListTable::get_filter_rating_arguments
Builds the meta_query arguments based on the current request.
Method of the class: ReviewsListTable{}
No Hooks.
Returns
Array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_filter_rating_arguments() : array;
ReviewsListTable::get_filter_rating_arguments() ReviewsListTable::get filter rating arguments code WC 10.3.6
protected function get_filter_rating_arguments() : array {
$args = [];
if ( empty( $this->current_reviews_rating ) ) {
return $args;
}
$args['meta_query'] = [
[
'key' => 'rating',
'value' => (int) $this->current_reviews_rating,
'compare' => '=',
'type' => 'NUMERIC',
],
];
return $args;
}