Created
November 10, 2020 20:16
-
-
Save cartpauj/c5a6c5ad5c7a84fcc492edbb5eb25898 to your computer and use it in GitHub Desktop.
Replace admin email in password change email - MemberPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Replace admin email in password changed email | |
// We can replace all message or other params like | |
// ###USERNAME### or ###SITENAME### this way | |
add_filter('password_change_email', 'replace_admin_email_in_pass_email', 10, 3); | |
function replace_admin_email_in_pass_email($pass_change_email, $user, $userdata) { | |
$pass_change_email['message'] = str_replace( '###ADMIN_EMAIL###', '[email protected]', $pass_change_email['message'] ); | |
return $pass_change_email; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment