diff --git a/includes/core/class-mail.php b/includes/core/class-mail.php index 121fd0df..bef34181 100644 --- a/includes/core/class-mail.php +++ b/includes/core/class-mail.php @@ -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 ); } diff --git a/readme.txt b/readme.txt index 56f16a6b..a05069e4 100644 --- a/readme.txt +++ b/readme.txt @@ -159,6 +159,7 @@ The plugin works with popular caching plugins by automatically excluding Ultimat * Enhancements: - Added: 'Owner and specific roles' privacy type for the Profile tabs (#773) + - Added: Hooks `um_before_email_notification_sending` and `um_after_email_notification_sending` regarding #743 pull-request * Bugfixes: - Fixed: PHP notice when the admin filtering field has the not array default value (e.g. bool)