• Hi, guys!

    I noticed that following code (to get products with a price range using WP_Query) does not work as expected in latest version of woocommerce 3.8, basically it does not work at all:

    $query['meta_query'][] = [
    	'key' => '_price',
    	'value' => [ absint( $min ), absint( $max ) ],
    	'compare' => 'BETWEEN',
    	'type' => 'NUMERIC'
    ];

    please, do you have any examples, how can i do a custom query to filter products with min / max price, order by popularity, average rating, etc.

    thank you in advance

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Any example of product custom queries?’ is closed to new replies.