From 275849b5daa2f21b6e561e4ddf3ae46a0c879b52 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 13 Aug 2015 00:33:56 -0300 Subject: [PATCH] [2.4] Fixe order by user and sorting by total, closes #8803 --- includes/admin/class-wc-admin-post-types.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 3f5a86d3dec..08f02b9c160 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1765,8 +1765,13 @@ class WC_Admin_Post_Types { // Filter the orders by the posted customer. if ( isset( $_GET['_customer_user'] ) && $_GET['_customer_user'] > 0 ) { - $vars['meta_key'] = '_customer_user'; - $vars['meta_value'] = (int) $_GET['_customer_user']; + $vars['meta_query'] = array( + array( + 'key' => '_customer_user', + 'value' => (int) $_GET['_customer_user'], + 'compare' => '=' + ) + ); } // Sorting