Fixed call to woocommerce_customer_get_total_spent_query filter
* Variable `$customer` was passed to `$wpdb->get_var()` instead of the filter.
This commit is contained in:
parent
a6bcc73846
commit
89efc65327
|
@ -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 );
|
", $customer ) );
|
||||||
|
|
||||||
if ( ! $spent ) {
|
if ( ! $spent ) {
|
||||||
$spent = 0;
|
$spent = 0;
|
||||||
|
|
Loading…
Reference in New Issue