Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created July 21, 2023 10:47
Show Gist options
  • Save andrewlimaza/3014915d2f9da9ee62da1e5349da96a5 to your computer and use it in GitHub Desktop.
Save andrewlimaza/3014915d2f9da9ee62da1e5349da96a5 to your computer and use it in GitHub Desktop.
CC an email address on the 'cancel_admin' email PMPro sends out.
<?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