WC_WCCOM_Site_Installer::get_wp_upgrader()
Get an instance of WP_Upgrader to use for installing plugins.
Method of the class: WC_WCCOM_Site_Installer{}
No Hooks.
Return
WP_Upgrader
.
Usage
$result = WC_WCCOM_Site_Installer::get_wp_upgrader();
WC_WCCOM_Site_Installer::get_wp_upgrader() WC WCCOM Site Installer::get wp upgrader code WC 9.4.2
public static function get_wp_upgrader() { if ( ! empty( self::$wp_upgrader ) ) { return self::$wp_upgrader; } require_once ABSPATH . 'wp-admin/includes/file.php'; require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; require_once ABSPATH . 'wp-admin/includes/plugin.php'; WP_Filesystem(); self::$wp_upgrader = new WP_Upgrader( new Automatic_Upgrader_Skin() ); self::$wp_upgrader->init(); wp_clean_plugins_cache(); return self::$wp_upgrader; }