Automattic\WooCommerce\Admin\API
Plugins::install_plugin()
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() 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 ); }