• Resolved norbertk

    (@norbertk)


    A day or two ago I began receiving changed password e-mails (to admin) after having disabled them via the code below. Is there a better/direct way to do so with Ultimate Member?

    if ( !function_exists( 'wp_password_change_notification' ) ) {
    	function wp_password_change_notification() {}
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • @norbertk

    This is a guide about “How To Disable WordPress Update Notifications (Plugin or Code)”

    https://kinsta.com/knowledgebase/disable-wordpress-update-notification/

    Thread Starter norbertk

    (@norbertk)

    There is no mention of “password changes” notifications in the article

    @norbertk

    You should try to use:

    add_filter( 'send_password_change_email', '__return_false' );

    This is the WP filter code:

    /**
    		 * Filters whether to send the password change email.
    		 *
    		 * @since 4.3.0
    		 *
    		 * @see wp_insert_user() For <code>$user</code> and <code>$userdata</code> fields.
    		 *
    		 * @param bool  $send     Whether to send the email.
    		 * @param array $user     The original user array.
    		 * @param array $userdata The updated user array.
    		 */
    		$send_password_change_email = apply_filters( 'send_password_change_email', true, $user, $userdata );
    • This reply was modified 1 year, 2 months ago by missveronica.

    @norbertk

    No the code snippet above will stop emails to the user from WP.

    Admin emails you can try to remove the call to the function you used by this code snippet

    remove_action( 'after_password_reset', 'wp_password_change_notification' );

    Thread Starter norbertk

    (@norbertk)

    Thanks this appears to have done the trick.

    remove_action( 'after_password_reset', 'wp_password_change_notification' );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changed Password Emails’ is closed to new replies.