diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php index 81ea0680052..ae032a08273 100644 --- a/includes/class-wc-install.php +++ b/includes/class-wc-install.php @@ -82,6 +82,7 @@ class WC_Install { */ public static function init() { add_action( 'init', array( __CLASS__, 'check_version' ), 5 ); + add_action( 'init', array( __CLASS__, 'init_background_updater' ), 5 ); add_action( 'admin_init', array( __CLASS__, 'install_actions' ) ); add_action( 'in_plugin_update_message-woocommerce/woocommerce.php', array( __CLASS__, 'in_plugin_update_message' ) ); add_filter( 'plugin_action_links_' . WC_PLUGIN_BASENAME, array( __CLASS__, 'plugin_action_links' ) ); @@ -89,8 +90,13 @@ class WC_Install { add_filter( 'wpmu_drop_tables', array( __CLASS__, 'wpmu_drop_tables' ) ); add_filter( 'cron_schedules', array( __CLASS__, 'cron_schedules' ) ); add_action( 'woocommerce_plugin_background_installer', array( __CLASS__, 'background_installer' ), 10, 2 ); + } - // Init background updates + /** + * Init background updates + */ + public static function init_background_updater() { + include_once( 'class-wc-background-updater.php' ); self::$background_updater = new WC_Background_Updater(); }