Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travislopes/44d7fb9ab2ed67fe41e1c5685b8cc066 to your computer and use it in GitHub Desktop.
Save travislopes/44d7fb9ab2ed67fe41e1c5685b8cc066 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