1

I've been struggling to find a hook I can use to edit the text in the password confirmed email that gets sent out when you've changed your password in WordPress.

Is there anyway to do this with a simple hook that I can add to the child themes functions?

Any help would be appreciated.

1 Answer 1

0

Use like this.

add_filter( 'password_change_email', 'wpse207879_change_password_mail_message', 10, 3 );
function wpse207879_change_password_mail_message( $pass_change_mail, $user, $userdata ) {
  $new_message_txt = __( 'Some text ###USERNAME### more text
      even more text ###EMAIL### more text after more text
      last bit of text ###SITENAME###' );
  $pass_change_mail[ 'message' ] = $new_message_txt;
  return $pass_change_mail;
}

Reference of the above code is: Change Password notification text on mail

This filter is in the wp_update_user() function and is documented here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.