Init background updater and include class to prevent error during uninstall
This commit is contained in:
parent
032e57d602
commit
1d9ab98649
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue