Schedule cron in the future

This commit is contained in:
Mike Jolley 2016-06-09 11:48:57 +01:00
parent c908fbde36
commit 9c8ad2e304
1 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,15 @@ class WC_Background_Updater extends WP_Background_Process {
}
}
/**
* Schedule event
*/
protected function schedule_event() {
if ( ! wp_next_scheduled( $this->cron_hook_identifier ) ) {
wp_schedule_event( time() + 10, $this->cron_interval_identifier, $this->cron_hook_identifier );
}
}
/**
* Error shown when the updater cannot dispatch.
*/