- Added: Hooks um_before_email_notification_sending and um_after_email_notification_sending regarding #743 pull-request

This commit is contained in:
nikitasinelnikov
2021-04-02 13:05:36 +03:00
parent 1d84138be4
commit caba3de9d5
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -405,6 +405,8 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
return;
}
do_action( 'um_before_email_notification_sending', $email, $template, $args );
$this->attachments = array();
$this->headers = 'From: '. stripslashes( UM()->options()->get('mail_from') ) .' <'. UM()->options()->get('mail_from_addr') .'>' . "\r\n";
@@ -450,6 +452,8 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
// Send mail
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
do_action( 'um_after_email_notification_sending', $email, $template, $args );
}