WordPress at Your Fingertips
function is not described


Plugins::install_plugin() public WC 1.0

Install the requested plugin.

{} It's a method of the class: Plugins{}

No Hooks.


WP_Error|Array. Plugin Status


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

Code of Plugins::install_plugin() WC 6.1.1

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