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::get_wporg_product_dir_name( int $product_id )
Get installed directory of WP.org product.
Description Description
Parameters Parameters
- $product_id
-
(Required) Product ID.
Return Return
(bool|string)
Source Source
File: includes/wccom-site/class-wc-wccom-site-installer.php
private static function get_wporg_product_dir_name( $product_id ) { $steps = self::get_state( 'steps' ); $product = $steps[ $product_id ]; if ( empty( $product['download_url'] ) || empty( $product['installed_path'] ) ) { return false; } // Check whether product was downloaded from WordPress.org. $parsed_url = wp_parse_url( $product['download_url'] ); if ( ! empty( $parsed_url['host'] ) && 'downloads.wordpress.org' !== $parsed_url['host'] ) { return false; } return basename( $product['installed_path'] ); }
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |