Added PR feedback.
This commit is contained in:
parent
b2c35a5ded
commit
83434deb42
|
@ -64,6 +64,7 @@ class WC_Customer_Data_Store extends WC_Data_Store_WP implements WC_Customer_Dat
|
||||||
'syntax_highlighting',
|
'syntax_highlighting',
|
||||||
'_order_count',
|
'_order_count',
|
||||||
'_money_spent',
|
'_money_spent',
|
||||||
|
'_last_order',
|
||||||
'_woocommerce_tracks_anon_id',
|
'_woocommerce_tracks_anon_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -456,7 +456,7 @@ function wc_delete_shop_order_transients( $order = 0 ) {
|
||||||
delete_transient( $transient );
|
delete_transient( $transient );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear money spent for user associated with order.
|
// Clear customer's order related caches.
|
||||||
if ( is_a( $order, 'WC_Order' ) ) {
|
if ( is_a( $order, 'WC_Order' ) ) {
|
||||||
$order_id = $order->get_id();
|
$order_id = $order->get_id();
|
||||||
delete_user_meta( $order->get_customer_id(), '_money_spent' );
|
delete_user_meta( $order->get_customer_id(), '_money_spent' );
|
||||||
|
|
|
@ -272,6 +272,7 @@ function wc_update_new_customer_past_orders( $customer_id ) {
|
||||||
update_user_meta( $customer_id, 'paying_customer', 1 );
|
update_user_meta( $customer_id, 'paying_customer', 1 );
|
||||||
update_user_meta( $customer_id, '_order_count', '' );
|
update_user_meta( $customer_id, '_order_count', '' );
|
||||||
update_user_meta( $customer_id, '_money_spent', '' );
|
update_user_meta( $customer_id, '_money_spent', '' );
|
||||||
|
delete_user_meta( $customer_id, '_last_order' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $linked;
|
return $linked;
|
||||||
|
|
Loading…
Reference in New Issue