0

In Woocommerce Category page default sort dropdown has like below options. enter image description here

My question is what/how products sort by Popularity ? Not a code What is the measurement ? like if sort Price: Low to High,then we know those product sort Low price to High then How about Popularity ?

2
0

'Sort By Popularity' filter sort products based on total sales of product

0

Well the option Sort by Popularity will sort the products based on Total sales. It means the product will sort from Higher sales to Lower sales.

You can get more idea from below code :-

$args['meta_key'] = 'total_sales';
add_filter( 'posts_clauses', array( $this, 'order_by_popularity_post_clauses' ) );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.