Skip to content

Documentation

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

PowerPack

⌘K
  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 = sprintf( 'Hi %s', $user->user_login ) . "\r\n\r\n";
	$content = 'Someone has requested a new password for the following account on YOUR_SITE_NAME' . "\r\n\r\n";
	$content .= sprintf( 'Username: %s', $user->user_login ) . "\r\n\r\n";
	$content .= "If you didn't make this request, just ignore this email. If you'd like to proceed:" . "\r\n\r\n";
	$content .= esc_url( $reset_url );

	return $content;
}, 10, 3 );
×