WordPress at Your Fingertips
function is not described

WC_WCCOM_Site_Installer::unpack_product() private WC 3.7.0

Unpack downloaded product.

{} It's a method of the class: WC_WCCOM_Site_Installer{}

No Hooks.

Return

\WP_Error|String.

Usage

$result = WC_WCCOM_Site_Installer::unpack_product( $product_id, $upgrader );
$product_id(int) (required)
Product ID.
$upgrader(\WP_Upgrader) (required)
Core class to handle installation.

Changelog

Since 3.7.0 Introduced.

Code of WC_WCCOM_Site_Installer::unpack_product() WC 6.1.0

private static function unpack_product( $product_id, $upgrader ) {
	$steps = self::get_state( 'steps' );
	if ( empty( $steps[ $product_id ]['download_path'] ) ) {
		return new WP_Error( 'missing_download_path', __( 'Could not find download path.', 'woocommerce' ) );
	}

	return $upgrader->unpack_package( $steps[ $product_id ]['download_path'], true );
}