plugin development – What is the meta_query key name for the woo product average rating?

Question

I am asking about meta_query key name to query the woocommerce all product 5 star average rating in wp_query

I have tried to use these names but not working (_wc_average_rating , average_rating, rating)

$args = array(
‘post_type’ => ‘product’,
‘posts_per_page’ => -1,
‘meta_query’ => array( array(
‘key’ => ‘_wc_average_rating’,
‘value’ => ‘5’,
‘compare’ => ‘=’,
)

0
osama B. 2 months 2022-10-12T02:33:51-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse