Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MaryOJob/63eb1fb7aeee05d606acc8e4b27f970c to your computer and use it in GitHub Desktop.
Save MaryOJob/63eb1fb7aeee05d606acc8e4b27f970c to your computer and use it in GitHub Desktop.
CC two additional emails on PMPro admin emails.
<?php // do not copy this line
/* Add CC for PMPro admin emails
* Add this snippet to your PMPro Customization Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_email_headers_admin_emails($headers, $email) {
//cc emails already going to admin_email
if(strpos($email->template, '_admin') !== false)
{
//add cc
$headers[] = 'cc:' . 'otheremail@domain.com, otheremail2@domain.com'; // type in your email address here please.
// if you want to cc only one email:, replace line 12 with: $headers[] = 'cc:' . 'otheremail@domain.com';
}
return $headers;
}
add_filter('pmpro_email_headers', 'my_pmpro_email_headers_admin_emails', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment