Forked from femiyb/my_pmpro_email_headers_admin_emails.php
Created
March 13, 2021 10:35
-
-
Save sbalci/d6158484e0adc6c70407d02497a0e790 to your computer and use it in GitHub Desktop.
This file contains 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 | |
/* | |
Add bcc for checkout emails | |
*/ | |
function my_pmpro_email_headers_admin_emails($headers, $email) | |
{ | |
//bcc checkout emails | |
if($email->template == "membership_expiring" || $email->template == "membership_expired") | |
{ | |
//add bcc | |
$headers[] = "Bcc:" . "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