Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How can I change the email that is inside the default email texts of wordpress?

There is definitely a filter for that!

Here is the reference link to wordpress developers page: https://developer.wordpress.org/reference/hooks/password_change_email/

Basically adding this function (with changes) to your functions.php will override your default password reset email.

apply_filters( 'password_change_email', array $pass_change_email, array $user, array $userdata )

full example:

add_filter( 'password_change_email', 'rt_change_password_mail_message', 10, 3 );

function rt_change_password_mail_message( $pass_change_mail, $user, $userdata ) {

 $new_message_txt = __( 'Hi [first_name] [last_name], 

 This notice confirms that your email was changed on on our site.

 If you did not change your email, please contact the Site Administrator on our site.

 This email has been sent to [user_email]

 Regards,
ME' );
 $pass_change_mail[ 'message' ] = $new_message_txt;
 return $pass_change_mail;

}

Checking the notes there, you’ll see that the message is part of the $pass_change_email array. SO if you just want to add something to it try this…

add_filter( 'password_change_email', 'rt_change_password_mail_message', 10, 3 );

function rt_change_password_mail_message( $pass_change_mail, $user, $userdata ) {

 $new_message_txt = __( 'new text with phone number' );
 $pass_change_mail[ 'message' ] = $pass_change_mail[ 'message' ] . $new_message_txt;
 return $pass_change_mail;

}

Related Posts:

  1. Editing ‘Password Reset’ E-mail
  2. Which Filter Do I Use To Modify The Subject Of The Retrieve Password Notification Email?
  3. Change password reqts with NO plugin without breaking resetpass link?
  4. How to add headers to outgoing email?
  5. How to apply the “retrieve_password_message” filter?
  6. How can I detect if a user changes their password?
  7. wp_mail – Remove sitename from email subject
  8. How to change/rewrite the lost password url?
  9. How to disable all WordPress emails modularly and programatically?
  10. How can I modify the default reset (lost) password email text?
  11. Is it possible to use a forgot password url filter?
  12. Change “You are now logged out” text
  13. wpmu_signup_user_notification filter not working
  14. Removing labels and tag on WordPress’s default login form
  15. Customize user account activation message
  16. How do we check if the user is logging in or registering?
  17. Change Password Strength Indicator names?
  18. add filter login_redirect does not contain original requested redirect
  19. Change username before login
  20. Right practice to edit WP reset password email
  21. Custom Login Errors and variables I can use
  22. Correct method of redirecting user login
  23. Change the default 10-day expiration for the password protected pages cookie
  24. How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?
  25. Filters on Login Page
  26. Is it possible to put the add-filter()-hook into a function?
  27. How do I hook my function to run only after submitting login form
  28. Help with filter for wp_notify_moderator()
  29. Change login CSS
  30. How to redirect non-logged in users to login with post_password_required()
  31. Trimming a custom field to a length
  32. Prevent reset password specific user role
  33. Error using wp_mail inside custom function
  34. What is the action hook to use if you want to capture the new password during password change?
  35. Filter page title (displayed in browser tab) of wp-login
  36. How to change default text for specific post type
  37. Email Obfuscation: Is antispambot() Acceptable? [closed]
  38. arguments for comment_notification_text filter
  39. How to redirect a unique link based on login status
  40. Would like to use hook or filters to customize email templates
  41. How to change lost password email text using custom plugin wordpress?
  42. login_url filter creates permanent wp-admin -> wp-login redirection loop
  43. Redirecting the lost password page request when using a custon login page
  44. Login logout below menu bar
  45. Filter wp_mail based on content type
  46. Hook into ‘when user logs in’ [persistent login]
  47. Cant login, Password MUST be reset error, after reset
  48. Better way to change the default password reset url with the woocommerce one?
  49. Gutenberg: Is there a way to know if current block is inside InnerBlocks?
  50. How to reorder billing fields in WooCommerce Checkout template? [closed]
  51. How to add a custom CSS class to core blocks in Gutenberg editor?
  52. Filter translations (gettext strings) on specific admin pages
  53. Filter hook before create order WooCommerce
  54. How to auto-translate custom user roles?
  55. Login email after registration never sent or received
  56. add_filter for specific pages
  57. Add Confirm Password field in wp-login.php Password Reset page
  58. How to add attribute to output with wp_video_shortcode add_filter
  59. Change default settings used by gallery shortcode
  60. PHP5, Inheritance, Singleton – action & filter hook limitations
  61. Please explain me what the do_action does
  62. Add ‘if exists’ to filter
  63. How to check if “media_send_to_editor” is audio?
  64. Changing Order of Filters
  65. Please help me through this example with a filter to understand how they work
  66. Filter custom post types in archive
  67. How can I filter block registration based on post-type? (Block alignment settings)
  68. wp_insert_post_data filter not working correctly after upgrade to WordPress 5
  69. Yoast SEO hooks overriding themselves
  70. Passing variable from child theme to parent theme
  71. How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
  72. How to take options from form fields and turn them in to links?
  73. Private page protected with username and password
  74. How add a group by to the query used by the media library?
  75. How to properly modify WP Vary or any existing headers?
  76. Wrapping my head around add_filter
  77. Filter for when the post is updated
  78. Filter a pluggable function
  79. Filter media upload attachment meta
  80. Filter have_posts()/ the_post()
  81. Filter wp_redirect() to stop redirect under certain condition
  82. How to add filter in custom rss feed
  83. How To Get Search Term and Use in Function
  84. Sending a password reset link
  85. How to pass a variable between filter/action functions?
  86. Filter the title to only affect the_title() template function
  87. How can I filter the comment action links so that I can display the actions links based on user capabilities?
  88. How can I limit access to uploaded media depending on the logged in user’s user role?
  89. How can I filter same content in page
  90. the_content filter not working when Jetpack activated. Any idea?
  91. Adding Filter | Page Title | Template | Why the_title affecting on menu?
  92. gettext filter does nothing
  93. Code restricted to dashboard, running unexpectedly in the frontend (pre_get_post and admin-ajax.php)
  94. Why none of xmlrpc filters work
  95. Filter on widget-title does not work with custom links
  96. Add a filter conditionally based on frontpage
  97. custom post filter based on Visitors country
  98. How to correctly override a filter?
  99. Is it possible to modify a WP search query to return results for private pages when not logged in?
  100. Accidentally created 2 pages, same name. Changing permalink on one changes both
Categories filters Tags email, filters, login, password, text
Any risk to changing WP table col CHARACTER_MAXIMUM_LENGTH?
Carriage Return control character (^M) found in wp-config-sample.php

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress