Woocommerce order by popularity
I have wp_query that outputs products for custom plugin :
$query_args = array( 'posts_per_page' => 10, 'post_status' => 'publish', 'post_type' => 'product', 'paged' => $paged); $r = new WP_Query($query_args); while ($r->have_posts()) : $r->the_post(); global $product;
I need to sort products by popularity, How can I do this?
- The topic ‘Woocommerce order by popularity’ is closed to new replies.