Hi there, thank you for reaching out to Paid Memberships Pro.
By default all admin notices are sent to the site admin email, however, you can replace this email address with your membership managers address using a code recipe.
https://gist.github.com/michaelbeil/5764cda4d9e99dc6fb713d77b4a0827f
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
If you already have a customizations plugin, you can add this recipe to your existing plugin file. Please be careful not to copy the opening ?php tag as it will trigger a fatal error. Here’s a helpful article on How to Copy and Paste Custom PHP Recipes.
Kind Regards,
Jarryd
Support Manager at Paid Memberships Pro
Thank you! I actually tried that already (using the same filter, just a different field name for recipient email) but it caused a site crash as soon as I did something that triggered an admin email. That’s why I posted here. However, I’ll try again using this code recipe you provided, maybe there was a typo before.
I’ve tested this recipe on a local environment and it’s worked as expected for me.
Please ensure you don’t copy the opening <?php tag into your file as this would cause a fatal error.
it’s working, must have been some typo on my previous snippet. Thanks. I’m not a newbie.
Just wanted to add, for others looking to do the same, to change the admin name as well as the email address (it shows up in the “Dear ___” header):
function my_pmpro_admin_email_header_name( $data, $email ) {
if ( strpos( $email->template, '_admin' ) !== false ) {
$data['header_name'] = 'Custom Admin Name';
}
return $data;
}
add_filter( 'pmpro_email_data', 'my_pmpro_admin_email_header_name', 10, 2 );
Thank you for your feedback and sharing this solution with everyone.
Feel free to reach out if there’s anything else we can assist with.