Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryOJob/6af83db7bb3ec934ea8bfdd72d6c6d94 to your computer and use it in GitHub Desktop.
Save MaryOJob/6af83db7bb3ec934ea8bfdd72d6c6d94 to your computer and use it in GitHub Desktop.
Change the admin email to three different recipients for all Paid Memberships Pro admin emails - Useful if you want your team to be notified on Member Notifications
<?php // do not copy this line
/**
* Change the email address to three other recipients for all admin related emails in Paid Memberships Pro.
* Follow this guide to add custom code to your WordPress site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_change_admin_to_email( $user_email, $email ){
if( strpos( $email->template, "_admin" ) !== false ) {
$user_email = 'memberadmin@someemail.co, othermemberadmin@someemail.co, othermemberadmin3@someemail.co';
}
return $user_email;
}
add_filter( "pmpro_email_recipient", "my_pmpro_change_admin_to_email", 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment