Automattic\WooCommerce\Blueprint\Importers

ImportInstallTheme::installprotectedWC 1.0

Install the theme from the local path.

Method of the class: ImportInstallTheme{}

No Hooks.

Returns

true|false. True if the installation was successful, false otherwise.

Usage

// protected - for code of main (parent) or child class
$result = $this->install( $local_path );
$local_path(string) (required)
The local path of the theme to be installed.

ImportInstallTheme::install() code WC 9.9.5

protected function install( $local_path ) {
	$unzip_result = $this->wp_unzip_file( $local_path, $this->wp_get_theme_root() );

	if ( $this->is_wp_error( $unzip_result ) ) {
		return false;
	}

	return true;
}