WordPress at Your Fingertips
function is not described

WC_Auth::handle_auth_requests() public WC 2.4.0

Handle auth requests.

{} It's a method of the class: WC_Auth{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Auth = new WC_Auth();
$WC_Auth->handle_auth_requests();

Changelog

Since 2.4.0 Introduced.

Code of WC_Auth::handle_auth_requests() WC 5.8.0

public function handle_auth_requests() {
	global $wp;

	if ( ! empty( $_GET['wc-auth-version'] ) ) { // WPCS: input var ok, CSRF ok.
		$wp->query_vars['wc-auth-version'] = wc_clean( wp_unslash( $_GET['wc-auth-version'] ) ); // WPCS: input var ok, CSRF ok.
	}

	if ( ! empty( $_GET['wc-auth-route'] ) ) { // WPCS: input var ok, CSRF ok.
		$wp->query_vars['wc-auth-route'] = wc_clean( wp_unslash( $_GET['wc-auth-route'] ) ); // WPCS: input var ok, CSRF ok.
	}

	// wc-auth endpoint requests.
	if ( ! empty( $wp->query_vars['wc-auth-version'] ) && ! empty( $wp->query_vars['wc-auth-route'] ) ) {
		$this->auth_endpoint( $wp->query_vars['wc-auth-route'] );
	}
}