Refactor Action Scheduler for not only email handling.

Updated the Action Scheduler implementation to improve flexibility and clarity. Replaced the 'enable_action_scheduler' option with 'enable_as_email_sending' for better specificity. Introduced hook-based checks to selectively enable email scheduling, ensuring compatibility and optimized performance.
This commit is contained in:
Mykyta Synelnikov
2025-04-04 12:59:10 +03:00
parent cc074bee3d
commit 3858c6af83
4 changed files with 28 additions and 15 deletions
+1 -1
View File
@@ -733,7 +733,7 @@ if ( ! class_exists( 'um\Config' ) ) {
'secure_notify_admins_banned_accounts__interval' => 'instant',
'secure_allowed_redirect_hosts' => '',
'delete_comments' => false,
'enable_action_scheduler' => false,
'enable_as_email_sending' => UM()->options()->get( 'enable_action_scheduler' ), // Use legacy option value by default. It helps during update to set the same value. The last version when we used 'enable_action_scheduler' is 2.10.2
);
add_filter( 'um_get_tabs_from_config', '__return_true' );