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. wp reset password page – head inline script
  5. How to add headers to outgoing email?
  6. How to apply the “retrieve_password_message” filter?
  7. How can I detect if a user changes their password?
  8. wp_mail – Remove sitename from email subject
  9. How to change/rewrite the lost password url?
  10. How to disable all WordPress emails modularly and programatically?
  11. How can I modify the default reset (lost) password email text?
  12. Is it possible to use a forgot password url filter?
  13. Change “You are now logged out” text
  14. wpmu_signup_user_notification filter not working
  15. Removing labels and tag on WordPress’s default login form
  16. Customize user account activation message
  17. How do we check if the user is logging in or registering?
  18. Change Password Strength Indicator names?
  19. add filter login_redirect does not contain original requested redirect
  20. Change username before login
  21. Right practice to edit WP reset password email
  22. Custom Login Errors and variables I can use
  23. Correct method of redirecting user login
  24. Change the default 10-day expiration for the password protected pages cookie
  25. How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?
  26. Filters on Login Page
  27. Is it possible to put the add-filter()-hook into a function?
  28. How do I hook my function to run only after submitting login form
  29. Help with filter for wp_notify_moderator()
  30. Change login CSS
  31. How to redirect non-logged in users to login with post_password_required()
  32. Trimming a custom field to a length
  33. Prevent reset password specific user role
  34. Error using wp_mail inside custom function
  35. What is the action hook to use if you want to capture the new password during password change?
  36. Filter page title (displayed in browser tab) of wp-login
  37. How to change default text for specific post type
  38. Email Obfuscation: Is antispambot() Acceptable? [closed]
  39. arguments for comment_notification_text filter
  40. How to redirect a unique link based on login status
  41. Would like to use hook or filters to customize email templates
  42. How to change lost password email text using custom plugin wordpress?
  43. login_url filter creates permanent wp-admin -> wp-login redirection loop
  44. Redirecting the lost password page request when using a custon login page
  45. Login logout below menu bar
  46. Filter wp_mail based on content type
  47. Hook into ‘when user logs in’ [persistent login]
  48. Cant login, Password MUST be reset error, after reset
  49. Better way to change the default password reset url with the woocommerce one?
  50. ‘Problem’ with login_redirect filter – why does it lose the redirect_to parameter
  51. Disable emojicons introduced with WP 4.2
  52. How to remove a filter that is an anonymous object?
  53. WordPress hooks/filters insert before content or after title
  54. How to add defer=”defer” tag in plugin javascripts?
  55. add_action(), add_filter() before or after function
  56. apply_filters(‘the_content’, $content) vs do_shortcode($content)
  57. How to login with email only no username?
  58. How do filters and hooks really work in PHP
  59. Trouble understanding apply_filters()
  60. What is the very earliest action hook you can call?
  61. How would one modify the filtering Gutenberg applies to pasted content?
  62. How can I modify the WordPress default widget output?
  63. Add custom options to the wplink dialog
  64. Remove classes from body_class
  65. what is __return_false in filters
  66. Explanation for apply_filters function and its variables
  67. Gutenberg: Is there a way to know if current block is inside InnerBlocks?
  68. How to reorder billing fields in WooCommerce Checkout template? [closed]
  69. Insert HTML just after tag
  70. the_content and is_main_query
  71. Changing WooCommerce Display Price Based on User Role & Category [closed]
  72. Disable user registration password email
  73. How to add a custom CSS class to core blocks in Gutenberg editor?
  74. How to show page content in feed?
  75. wp_headers vs send_headers. When to use each?
  76. Filter any HTTP request URI?
  77. How to Pass External Variables to Filters/Actions
  78. How to filter users on admin users page by custom meta field?
  79. Check for correct username on custom login form
  80. Filter by one custom field, order by another?
  81. Not able to change wp_title using add_filter
  82. How to appending to the_content using add_filter with custom post type?
  83. Query WP REST API v2 by multiple meta keys
  84. No filter of code on switch from html to visual editor, how?
  85. Sanitize and data validation with apply_filters() function
  86. How to modify posts_where filter only for the search query
  87. How to hook a filter to catch get_post_meta when alternate a custom field output?
  88. How to get shortcode’s input values inside a filter?
  89. Removing Image and Caption Dimension Attributes
  90. Missing URL in password reset email
  91. How to wrap oEmbed-embedded video in DIV tags inside the_content?
  92. How to bulk delete all users with no posts?
  93. How many filter/action hooks are healthy?
  94. WordPress 3.9 – Trouble Editing TinyMCE 4.0
  95. How do I require authorization / login to view a specific set of posts / pages?
  96. Changing JPEG compression depending on image size
  97. How to add filter with 2 args?
  98. Why is javascript allowed in my post content?
  99. How to use update_{$meta_type}_metadata filter to modify meta value
  100. How to wrap an element around an iframe or embed in content automatically?
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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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