Automattic\WooCommerce\Admin\API

Plugins::install_plugin()publicWC 1.0

Install the requested plugin.

Метод класса: Plugins{}

Хуков нет.

Возвращает

WP_Error|Массив. Plugin Status

Использование

$Plugins = new Plugins();
$Plugins->install_plugin( $request );
$request(WP_REST_Request) (обязательный)
Full details about the request.

Код Plugins::install_plugin() WC 9.3.3

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