WC_Helper::_helper_auth_refresh()private staticWC 1.0

User hit the Refresh button, clear all caches.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = WC_Helper::_helper_auth_refresh();

Код WC_Helper::_helper_auth_refresh() WC 8.5.2

private static function _helper_auth_refresh() {
	if ( empty( $_GET['wc-helper-nonce'] ) || ! wp_verify_nonce( wp_unslash( $_GET['wc-helper-nonce'] ), 'refresh' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
		self::log( 'Could not verify nonce in _helper_auth_refresh' );
		wp_die( 'Could not verify nonce' );
	}

	self::refresh_helper_subscriptions();

	$redirect_uri = self::get_helper_redirect_url(
		array(
			'page'             => 'wc-addons',
			'section'          => 'helper',
			'filter'           => self::get_current_filter(),
			'wc-helper-status' => 'helper-refreshed',
		),
		isset( $_GET['redirect-to-wc-admin'] ),
		isset( $_GET['install'] ) ? sanitize_text_field( wp_unslash( $_GET['install'] ) ) : ''
	);

	wp_safe_redirect( $redirect_uri );
	die();
}