WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Admin

PluginsInstaller::possibly_install_activate_plugins() public WC 1.0

Check if an install or activation is being requested via URL query.

{} Это метод класса: PluginsInstaller{}

Хуков нет.

Возвращает

null. Ничего.

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

$result = PluginsInstaller::possibly_install_activate_plugins();

Код PluginsInstaller::possibly_install_activate_plugins() WC 5.4.1

<?php
public static function possibly_install_activate_plugins() {
	/* phpcs:disable WordPress.Security.NonceVerification.Recommended */
	if ( ! isset( $_GET['plugin_action'] ) || ! isset( $_GET['plugins'] ) || ! current_user_can( 'install_plugins' ) ) {
		return;
	}

	$plugins       = sanitize_text_field( wp_unslash( $_GET['plugins'] ) );
	$plugin_action = sanitize_text_field( wp_unslash( $_GET['plugin_action'] ) );
	/* phpcs:enable WordPress.Security.NonceVerification.Recommended */

	$plugins_api     = new Plugins();
	$install_result  = null;
	$activate_result = null;

	switch ( $plugin_action ) {
		case 'install':
			$install_result = $plugins_api->install_plugins( array( 'plugins' => $plugins ) );
			break;
		case 'activate':
			$activate_result = $plugins_api->activate_plugins( array( 'plugins' => $plugins ) );
			break;
		case 'install-activate':
			$install_result  = $plugins_api->install_plugins( array( 'plugins' => $plugins ) );
			$activate_result = $plugins_api->activate_plugins( array( 'plugins' => implode( ',', $install_result['data']['installed'] ) ) );
			break;
	}

	self::cache_results( $install_result, $activate_result );
	self::redirect_to_referer();
}