Wordpress - Disable user notification on password change
Asked Answered
I

1

6

Our client wants to disable the default notification email that sends Wordpress when someone uses the "forgot password" form.

The client uses a theme that also sends out an email with the new password so the default notification should be disabled.

But I don't know how to do this, can anyone help me with this?

Regards

Idioglossia answered 27/6, 2018 at 6:45 Comment(0)
R
7

Add this line to your function file to disable default password change notification in wordpress.

To disable the notice of changed email sent by the wp_update_user() function, simply use the filter hook to return false:

add_filter( 'send_email_change_email', '__return_false' );

Reference - https://codex.wordpress.org/Plugin_API/Filter_Reference/send_email_change_email

Method 2

if ( !function_exists( 'wp_password_change_notification' ) ) {
    function wp_password_change_notification() {}
}

put this code in your plugin file for method 2. Note - it will not work if you put in your theme function file

Reference - http://www.wpbeginner.com/wp-tutorials/how-to-disable-lostchanged-password-emails-in-wordpress/

Method 3 - use this plugin to get required output

https://wordpress.org/plugins/manage-notification-emails/

Rampant answered 27/6, 2018 at 6:52 Comment(4)
Hi, I tried this but it keeps sending out the email notification with subject "Message about password change".Idioglossia
Try method 2 and checkRampant
Unfortunately I still get 2 notifications. I did the option with the code snippet plugin or do I really need to make a plugin?Idioglossia
Try method 3 if you don't want to create plugin. else in method 2 its good if you can create custom pluginRampant

© 2022 - 2024 — McMap. All rights reserved.