WC_REST_Authentication::check_authentication_error
Check for authentication error.
Method of the class: WC_REST_Authentication{}
No Hooks.
Returns
WP_Error|null|true|false.
Usage
$WC_REST_Authentication = new WC_REST_Authentication(); $WC_REST_Authentication->check_authentication_error( $error );
- $error(WP_Error|null|true|false) (required)
- Error data.
WC_REST_Authentication::check_authentication_error() WC REST Authentication::check authentication error code WC 10.7.0
public function check_authentication_error( $error ) {
// Pass through other errors.
if ( ! empty( $error ) ) {
return $error;
}
return $this->get_error();
}