Automattic\WooCommerce\Admin\API

Plugins::install_plugin()publicWC 1.0

Install the requested plugin.

Method of the class: Plugins{}

No Hooks.

Return

WP_Error|Array. Plugin Status

Usage

$Plugins = new Plugins();
$Plugins->install_plugin( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Plugins::install_plugin() code WC 7.3.0

public function install_plugin( $request ) {
	wc_deprecated_function( 'install_plugin', '4.3', '\Automattic\WooCommerce\Admin\API\Plugins()->install_plugins' );
	// This method expects a `plugin` argument to be sent, install plugins requires plugins.
	$request['plugins'] = $request['plugin'];
	return self::install_plugins( $request );
}