• Resolved tnightingale

    (@tnightingale)


    Would be great if there were a setting on the email settings tab to enter a different email address for all the admin notifications. I’m sure that a lot of sites don’t want all the member notices going to the primary site admin, but rather to a membership manager for example. Until that setting is added, what’s the simplest way to achieve this? Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Jarryd Long

    (@jarryd-long)

    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

    Thread Starter tnightingale

    (@tnightingale)

    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.

    Plugin Support Jarryd Long

    (@jarryd-long)

    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.

    Thread Starter tnightingale

    (@tnightingale)

    it’s working, must have been some typo on my previous snippet. Thanks. I’m not a newbie.

    Thread Starter tnightingale

    (@tnightingale)

    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 );

    Plugin Support Jarryd Long

    (@jarryd-long)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Set a different admin notification email’ is closed to new replies.