Forked from strangerstudios/my_pmpro_email_headers_admin_emails.php
Last active
September 27, 2021 11:36
-
-
Save andrewlimaza/0f33ddf6db7789ec583e2e6a0fb36283 to your computer and use it in GitHub Desktop.
BCC an additional email on PMPro admin checkout emails only.
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
/* | |
Add bcc for PMPro admin emails | |
*/ | |
function my_pmpro_email_headers_admin_emails($headers, $email) { | |
//bcc emails already going to admin_email | |
if(strpos($email->template, "_admin") !== false && strpos($email->template, "checkout") !== false) | |
{ | |
//add bcc | |
$headers[] = "Bcc:" . "[email protected]"; | |
} | |
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