skip to Main Content
WordPress – Change Password Notification Text On E-mail

WordPress – Change Password notification text on E-mail

The WordPress is the most popular and highest used CMS framework. WordPress provide hook functionality. Using hook functionality we can change the WordPress default functionality without touching the WordPress file.

Let’s how we can change the text of Change password notification E-mail text using Hook.

WordPress provide password_change_email Filter hook for change the text of E-mail. Let’s write that hook on functions.php file on the active theme.

add_filter( 'password_change_email', 'thecodingstuff_change_password_mail_text', 10, 3 );
function thecodingstuff_change_password_mail_text( $pass_change_mail, $user, $userdata ) {
  $emailContent = __( 'Hi ###USERNAME###,

    This notice confirms that your password was changed on ###SITENAME###.

    If you did not change your password, please contact the Site Administrator at
    ###ADMIN_EMAIL###

    This email has been sent to ###EMAIL###

    Regards,
    TheCodingStuff' );

  $pass_change_mail[ 'message' ] = $emailContent;

  return $pass_change_mail;
}

Using WordPress we can able to change the text of the password change e-mail message like above.

If you face any issue after using above hook write the comment below.

 

Saroj

I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top