Created
July 21, 2023 10:47
-
-
Save andrewlimaza/3014915d2f9da9ee62da1e5349da96a5 to your computer and use it in GitHub Desktop.
CC an email address on the 'cancel_admin' email PMPro sends out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* CC an email address on the 'cancel_admin' email PMPro sends out. | |
* Add this code to your site by following - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_email_headers_admin_cancel_emails($headers, $email) { | |
//cc emails already going to admin_email | |
if( $email->template == 'cancel_admin' ) { | |
//add cc | |
$headers[] = 'CC:' . '[email protected]'; // type in your email address here please. | |
} | |
return $headers; | |
} | |
add_filter('pmpro_email_headers', 'my_pmpro_email_headers_admin_cancel_emails', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment