From 42188baea6e7e81f770ef733b81d6caa2d5093dc Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Tue, 4 Jul 2023 00:37:17 +0800 Subject: [PATCH] Fix wp schedule event for email notifications --- includes/core/class-secure.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/core/class-secure.php b/includes/core/class-secure.php index d740f42a..117c8109 100644 --- a/includes/core/class-secure.php +++ b/includes/core/class-secure.php @@ -505,10 +505,15 @@ if ( ! class_exists( 'um\core\Secure' ) ) { if ( UM()->options()->get( 'secure_notify_admins_banned_accounts' ) ) { add_action( 'um_secure_notify_administrator_hourly', array( $this, 'notify_administrators_hourly' ) ); add_action( 'um_secure_notify_administrator_daily', array( $this, 'notify_administrators_daily' ) ); - if ( ! wp_next_scheduled( 'um_secure_notify_administrator' ) ) { + + if ( ! wp_next_scheduled( 'um_secure_notify_administrator_hourly' ) ) { wp_schedule_event( current_time( 'mysql' ), 'hourly', 'um_secure_notify_administrator_hourly' ); + } + + if ( ! wp_next_scheduled( 'um_secure_notify_administrator_daily' ) ) { wp_schedule_event( current_time( 'mysql' ), 'daily', 'um_secure_notify_administrator_daily' ); } + } }