関数
PollingCron::scheduleEvent()
戻り値 戻り値
ファイル: src/Admin/PollingCron.php
public function scheduleEvent() {
add_action(self::EVENT_NAME, [$this, 'updateAllOrders']);
$cron = wp_next_scheduled(self::EVENT_NAME);
if ($cron) {
return false;
}
$unixts = (new DateTime('now', new DateTimeZone('UTC')))->getTimestamp();
return wp_schedule_event($unixts, 'hourly', self::EVENT_NAME);
}