From a6bcc73846fdfe617b82aa3e7e1ba7ce3e2a1d28 Mon Sep 17 00:00:00 2001 From: Diego Zanella Date: Tue, 23 May 2017 17:06:16 +0100 Subject: [PATCH] Added $customer to filter woocommerce_customer_get_total_spent_query --- includes/data-stores/class-wc-customer-data-store.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/data-stores/class-wc-customer-data-store.php b/includes/data-stores/class-wc-customer-data-store.php index 79cb54d23b0..94cc66675da 100644 --- a/includes/data-stores/class-wc-customer-data-store.php +++ b/includes/data-stores/class-wc-customer-data-store.php @@ -350,7 +350,7 @@ class WC_Customer_Data_Store extends WC_Data_Store_WP implements WC_Customer_Dat AND posts.post_type = 'shop_order' AND posts.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' ) AND meta2.meta_key = '_order_total' - " ) ); + " ), $customer ); if ( ! $spent ) { $spent = 0;