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::activate_product( int $product_id )
Activate product given its product ID.
Description Description
Parameters Parameters
- $product_id
-
(Required) Product ID.
Return Return
(WP_Error|null)
Source Source
File: includes/wccom-site/class-wc-wccom-site-installer.php
private static function activate_product( $product_id ) { $steps = self::get_state( 'steps' ); if ( ! $steps[ $product_id ]['activate'] ) { return null; } if ( 'plugin' === $steps[ $product_id ]['product_type'] ) { return self::activate_plugin( $product_id ); } return self::activate_theme( $product_id ); }
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |