Forked from andrewlimaza/cc-pmpro-admin-email-cancel.php
Last active
August 28, 2025 16:07
-
-
Save kimwhite/45fabb16ff7fad52972348088bb893d5 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 == 'membership_recurring' ) { | |
| //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