Call create_cron_jobs from the core install. I also renamed create_events to create_cron_jobs to match the function name used in the core
This commit is contained in:
parent
eb5e56e374
commit
80d5d7fc43
|
@ -341,6 +341,7 @@ class WC_Install {
|
|||
self::setup_environment();
|
||||
self::create_terms();
|
||||
self::create_cron_jobs();
|
||||
WCA_Install::create_cron_jobs();
|
||||
self::create_files();
|
||||
self::maybe_create_pages();
|
||||
self::maybe_set_activation_transients();
|
||||
|
|
|
@ -205,7 +205,6 @@ class Install {
|
|||
// If we made it till here nothing is running yet, lets set the transient now.
|
||||
set_transient( 'wc_admin_installing', 'yes', MINUTE_IN_SECONDS * 10 );
|
||||
|
||||
self::create_events();
|
||||
self::delete_obsolete_notes();
|
||||
self::maybe_update_db_version();
|
||||
|
||||
|
@ -492,7 +491,7 @@ class Install {
|
|||
/**
|
||||
* Schedule cron events.
|
||||
*/
|
||||
public static function create_events() {
|
||||
public static function create_cron_jobs() {
|
||||
if ( ! wp_next_scheduled( 'wc_admin_daily' ) ) {
|
||||
wp_schedule_event( time(), 'daily', 'wc_admin_daily' );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue