WC_Auth::handle_auth_requests
Handle auth requests.
Method of the class: WC_Auth{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Auth = new WC_Auth(); $WC_Auth->handle_auth_requests();
Changelog
| Since 2.4.0 | Introduced. |
WC_Auth::handle_auth_requests() WC Auth::handle auth requests code WC 10.3.3
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'] );
}
}