Added $customer to filter woocommerce_customer_get_total_spent_query
This commit is contained in:
parent
885cb14029
commit
a6bcc73846
|
@ -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_type = 'shop_order'
|
||||||
AND posts.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
|
AND posts.post_status IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
|
||||||
AND meta2.meta_key = '_order_total'
|
AND meta2.meta_key = '_order_total'
|
||||||
" ) );
|
" ), $customer );
|
||||||
|
|
||||||
if ( ! $spent ) {
|
if ( ! $spent ) {
|
||||||
$spent = 0;
|
$spent = 0;
|
||||||
|
|
Loading…
Reference in New Issue