Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_WCCOM_Site_Installer::unpack_product( int $product_id, WP_Upgrader $upgrader )
Unpack downloaded product.
Description Description
Parameters Parameters
- $product_id
-
(Required) Product ID.
- $upgrader
-
(Required) Core class to handle installation.
Return Return
(WP_Error|string)
Source Source
File: includes/wccom-site/class-wc-wccom-site-installer.php
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 ); }
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |