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.


Top ↑

Return Return

(WP_Error|null)


Top ↑

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.