Merge pull request #19515 from woocommerce/fix/order-products-by-price

Use minimum price to order variable products on term archives
This commit is contained in:
Mike Jolley 2018-03-26 11:17:23 +01:00 committed by GitHub
commit c8f6330158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -508,7 +508,7 @@ class WC_Query {
$search_within_terms = get_term_children( $wp_query->queried_object->term_taxonomy_id, $wp_query->queried_object->taxonomy );
$search_within_terms[] = $wp_query->queried_object->term_taxonomy_id;
$args['join'] .= " INNER JOIN (
SELECT post_id, max( meta_value+0 ) price
SELECT post_id, min( meta_value+0 ) price
FROM $wpdb->postmeta
INNER JOIN (
SELECT $wpdb->term_relationships.object_id