Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.