mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
https://github.com/strangerstudios/pmpro-snippets-library/blob/dev/email/bcc-email-addresses-on-notifications.php
10 lines
326 B
Text
10 lines
326 B
Text
function my_pmpro_email_headers_admin_emails( $headers, $email ) {
|
|
|
|
// BCC emails already going to admin_email.
|
|
if ( strpos( $email->template, '_admin' ) !== false ) {
|
|
$headers[] = 'Bcc:' . 'otheremail@domain.com';
|
|
}
|
|
|
|
return $headers;
|
|
}
|
|
add_filter( 'pmpro_email_headers', 'my_pmpro_email_headers_admin_emails', 10, 2 );
|