diff --git a/includes/class-wc-query.php b/includes/class-wc-query.php index c4573f2ee7b..003983e917d 100644 --- a/includes/class-wc-query.php +++ b/includes/class-wc-query.php @@ -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;