Skip to content

Documentation

Extensive Documentation for PowerPack & WooPack to help you with common questions and issues.

PowerPack

  1. Home
  2. Docs
  3. PowerPack
  4. Modules
  5. Login Form
  6. How to change the content of the password reset email?

How to change the content of the password reset email?

You can translate the content of the password reset email by using any translation plugins. You can also modify the text using the existing filter: pp_login_form_password_reset_email_content

Please add the following code in your current theme’s functions.php file to change the message using filter:

add_filter( 'pp_login_form_password_reset_email_content', function( $content, $user, $reset_url ) {
	$content = '<p>' . sprintf( 'Hi %s', $user->user_login ) . '</p>';
	$content = '<p>Someone has requested a new password for the following account on YOUR_SITE_NAME</p>';
	$content .= '<p>' . sprintf( 'Username: %s', $user->user_login ) . '</p>';
	$content .= "If you didn't make this request, just ignore this email. If you'd like to proceed:";
	$content .= '<p><a class="link" href="' . esc_url( $reset_url ) . '">Click here to reset your password</a></p>';

	return $content;
}, 10, 3 );
Was this article helpful to you? Yes No
×