- updated structure for action scheduler;

This commit is contained in:
Mykyta Synelnikov
2024-09-06 15:03:50 +03:00
parent 5385e07a5f
commit 6df83f4f09
9 changed files with 201 additions and 236 deletions
+2 -5
View File
@@ -503,10 +503,7 @@ if ( ! class_exists( 'UM' ) ) {
*/
public function includes() {
$this->action_scheduler();
if ( $this->options()->get( 'enable_action_scheduler' ) ) {
$this->action_scheduler()->proxy();
}
$this->maybe_action_scheduler();
$this->common()->includes();
@@ -1465,7 +1462,7 @@ if ( ! class_exists( 'UM' ) ) {
*
* @return um\action_scheduler\Init
*/
public function action_scheduler() {
public function maybe_action_scheduler() {
if ( empty( $this->classes['action_scheduler'] ) ) {
$this->classes['action_scheduler'] = new um\action_scheduler\Init();
}