Merge pull request #9632 from woothemes/issue-9584/fix-price-ordering

Fix invalid orderby key name for orderby pricing closes #9584
This commit is contained in:
Claudio Sanches 2015-11-24 19:11:52 -02:00
commit 8c805eccf0
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ class WC_Query {
$args['order'] = $order == 'ASC' ? 'ASC' : 'DESC';
break;
case 'price' :
$args['orderby'] = "meta_value_num {$wpdb->posts}.ID";
$args['orderby'] = "meta_value_num ID";
$args['order'] = $order == 'DESC' ? 'DESC' : 'ASC';
$args['meta_key'] = '_price';
break;