Automattic\WooCommerce\Admin\PluginsInstallLoggers

AsyncPluginsInstallLogger::install_requested()publicWC 1.0

Add requested plugin.

Method of the class: AsyncPluginsInstallLogger{}

No Hooks.

Return

null. Nothing (null).

Usage

$AsyncPluginsInstallLogger = new AsyncPluginsInstallLogger();
$AsyncPluginsInstallLogger->install_requested( $plugin_name );
$plugin_name(string) (required)
plugin name.

AsyncPluginsInstallLogger::install_requested() code WC 9.1.2

public function install_requested( string $plugin_name ) {
	$option = $this->get();
	if ( ! isset( $option['plugins'][ $plugin_name ] ) ) {
		$option['plugins'][ $plugin_name ] = array(
			'status'           => 'installing',
			'errors'           => array(),
			'install_duration' => 0,
		);
	}
	$this->update( $option );
}