Plugin Support
Yurii
(@yuriinalivaiko)
Hello @denialdesign
There is no specific hook for the email headers, but you can use the um_email_send_subject filter hook to modify email headers stored in the UM()->mail()->headers option.
Try this code snippet:
/**
* Add the "Bcc" header to the "Account Updated" email.
* Send the mail copy to the website admins.
*
* @param string $subject Email subject.
* @param string $template Email template key.
*/
function my_um_email_changedaccount_email_bcc( $subject, $template ) {
if ( 'changedaccount_email' === $template ) {
$bcc = um_multi_admin_email();
UM()->mail()->headers .= 'Bcc: ' . implode( ',', $bcc ) . "\r\n";
}
return $subject;
}
add_filter( 'um_email_send_subject', 'my_um_email_changedaccount_email_bcc', 10, 2 );
There is no easy way to add a summary of the changes to this email. To do this you should replace the um_account_updated_notification function with your custom function and use data from the $changed parameter to add tags and tags_replace pair to the email arguments array. This way you can add support for the custom placeholder in this email template.
Regards