mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Refactor batch action scheduling for account status updates (#1692)
Updated batch action logic to utilize correct constants and ensure proper scheduling. Added fallback scheduling logic in admin notices to address unscheduled batch actions and improve reliability.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace um\admin\core;
|
||||
|
||||
use um\common\actions\Users;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
@@ -261,6 +263,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Alternative method of checking and maybe schedule a batch action if it has not been scheduled previously.
|
||||
// Avoid case when the option with the empty user statuses isn't empty.
|
||||
// We need to recalculate option value and re-schedule the Batch action.
|
||||
if ( ! UM()->maybe_action_scheduler()->has_scheduled_action( Users::BATCH_ACTION ) ) {
|
||||
do_action( Users::SCHEDULE_ACTION );
|
||||
}
|
||||
|
||||
$allowed_html = array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
|
||||
Reference in New Issue
Block a user