ActionScheduler_QueueRunner::init()
Метод класса: ActionScheduler_QueueRunner{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
$ActionScheduler_QueueRunner = new ActionScheduler_QueueRunner(); $ActionScheduler_QueueRunner->init();
Код ActionScheduler_QueueRunner::init() ActionScheduler QueueRunner::init WC 9.3.3
public function init() { add_filter( 'cron_schedules', array( self::instance(), 'add_wp_cron_schedule' ) ); // Check for and remove any WP Cron hook scheduled by Action Scheduler < 3.0.0, which didn't include the $context param $next_timestamp = wp_next_scheduled( self::WP_CRON_HOOK ); if ( $next_timestamp ) { wp_unschedule_event( $next_timestamp, self::WP_CRON_HOOK ); } $cron_context = array( 'WP Cron' ); if ( ! wp_next_scheduled( self::WP_CRON_HOOK, $cron_context ) ) { $schedule = apply_filters( 'action_scheduler_run_schedule', self::WP_CRON_SCHEDULE ); wp_schedule_event( time(), $schedule, self::WP_CRON_HOOK, $cron_context ); } add_action( self::WP_CRON_HOOK, array( self::instance(), 'run' ) ); $this->hook_dispatch_async_request(); }