Merge pull request #14622 from jaumarar/patch-2
Fix: Creating customer triggers password changed
This commit is contained in:
commit
481a5045aa
|
@ -101,6 +101,10 @@ class WC_Customer_Data_Store extends WC_Data_Store_WP implements WC_Customer_Dat
|
||||||
|
|
||||||
$customer->set_id( $id );
|
$customer->set_id( $id );
|
||||||
$this->update_user_meta( $customer );
|
$this->update_user_meta( $customer );
|
||||||
|
|
||||||
|
// Prevent wp_update_user calls in the same request and customer trigger the 'Notice of Password Changed' email
|
||||||
|
$customer->set_password( '' );
|
||||||
|
|
||||||
wp_update_user( apply_filters( 'woocommerce_update_customer_args', array(
|
wp_update_user( apply_filters( 'woocommerce_update_customer_args', array(
|
||||||
'ID' => $customer->get_id(),
|
'ID' => $customer->get_id(),
|
||||||
'role' => $customer->get_role(),
|
'role' => $customer->get_role(),
|
||||||
|
|
Loading…
Reference in New Issue