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

WC_Admin::admin_redirects() public WC 1.0

Handle redirects to setup/welcome page after install and updates.

The user must have access rights, and we must ignore the network/bulk plugin updaters.

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

Хуков нет.

Возвращает

Null. Ничего.

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

$WC_Admin = new WC_Admin();
$WC_Admin->admin_redirects();

Код WC_Admin::admin_redirects() WC 4.9.1

<?php
public function admin_redirects() {
	// Don't run this fn from Action Scheduler requests, as it would clear _wc_activation_redirect transient.
	// That means OBW would never be shown.
	if ( wc_is_running_from_async_action_scheduler() ) {
		return;
	}

	// phpcs:disable WordPress.Security.NonceVerification.Recommended
	// Nonced plugin install redirects.
	if ( ! empty( $_GET['wc-install-plugin-redirect'] ) ) {
		$plugin_slug = wc_clean( wp_unslash( $_GET['wc-install-plugin-redirect'] ) );

		if ( current_user_can( 'install_plugins' ) && in_array( $plugin_slug, array( 'woocommerce-gateway-stripe' ), true ) ) {
			$nonce = wp_create_nonce( 'install-plugin_' . $plugin_slug );
			$url   = self_admin_url( 'update.php?action=install-plugin&plugin=' . $plugin_slug . '&_wpnonce=' . $nonce );
		} else {
			$url = admin_url( 'plugin-install.php?tab=search&type=term&s=' . $plugin_slug );
		}

		wp_safe_redirect( $url );
		exit;
	}

	// phpcs:enable WordPress.Security.NonceVerification.Recommended
}