- added hook comments;

- updated versions and changelog;
- updated gulpfile.js;
This commit is contained in:
Mykyta Synelnikov
2023-05-23 16:37:20 +03:00
parent 30482254ba
commit 74afe64226
6 changed files with 69 additions and 8 deletions
+13 -1
View File
@@ -414,7 +414,19 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
if ( ! empty( UM()->options()->get( $template . '_on' ) ) ) {
return;
}
/**
* Filters for disabling email notifications programmatically.
*
* @since 2.6.1
* @hook um_disable_email_notification_sending
*
* @param {bool} $disabled Does an email is disabled programmatically. By default it is false.
* @param {string} $email Email address for sending.
* @param {string} $template Email template key.
* @param {array} $args Arguments for sending email.
*
* @return {bool} `true` if email is disabled programmatically.
*/
$hook_disabled = apply_filters( 'um_disable_email_notification_sending', false, $email, $template, $args );
if ( false !== $hook_disabled ) {
return;