Automattic\WooCommerce\Blueprint\Importers

ImportInstallTheme::install │ protected │ WC 1.0

Install the theme from the local path.

Метод класса: ImportInstallTheme{}

Хуков нет.

Возвращает

bool. True if the installation was successful, false otherwise.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->install( $local_path );
$local_path(строка) (обязательный)
The local path of the theme to be installed.

Код ImportInstallTheme::install() WC 11.2.2

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;
}