Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ForGravity/fcb19e9661e5cd1df5f9e29ed6fbf1f7 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'fg_entryautomation_export_email_headers', 'add_export_bcc_address', 10, 3 );
/**
* Add BCC header to Entry Automation export email.
*
* @param array $headers Email headers.
* @param array $task Entry Automation Task meta.
* @param string $file_path Export file path.
*
* @return array
*/
function add_export_bcc_address( $headers = array(), $task = array(), $file_path = '' ) {
// If this is not the task we want to add the BCC header to, return.
if ( 10 !== $task['task_id'] ) {
return $headers;
}
// Add BCC header.
$headers[] = 'Bcc: example@domain.com';
return $headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment