Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cartpauj/c5a6c5ad5c7a84fcc492edbb5eb25898 to your computer and use it in GitHub Desktop.
Save cartpauj/c5a6c5ad5c7a84fcc492edbb5eb25898 to your computer and use it in GitHub Desktop.
Replace admin email in password change email - MemberPress
<?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