qqruza
qqruza

Reputation: 1417

Disable wordpress 4.3 send email when password has been changed

Wordpress developers say: You can disable these e-mails via the send_pass_change_email and send_email_change_email filters by setting them to false.

I have added these lines into my plugin but it doesn't help:

function no_email_pass_change(){ return false; }
add_filter( 'send_pass_change_email' , 'no_email_password_change');

function no_email_email_change(){ return false; }
add_filter( 'send_email_change_email' , 'no_email_email_change');

function no_email_password_change(){ return false; }
add_filter( 'wp_password_change_notification' , 'no_email_password_change');

Also I tried these:

add_filter( 'send_pass_change_email', '__return_false');
add_filter( 'send_email_change_email', '__return_false');

But nothing helps. It is applicable only to WP 4.3. What am I doing wrong?

Upvotes: 5

Views: 4213

Answers (2)

// Disabled send emails when change password.

add_filter( 'send_password_change_email', '__return_false' );

// Disabled send emails when change email.

add_filter( 'send_email_change_email', '__return_false' );

Upvotes: 2

qqruza
qqruza

Reputation: 1417

Use the following:

  add_filter( 'send_password_change_email', '__return_false');

They put the wrong description in the documentation.

Upvotes: 9

Related Questions