WC_REST_Authentication::check_authentication_error()publicWC 1.0

Check for authentication error.

Method of the class: WC_REST_Authentication{}

No Hooks.

Return

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() code WC 8.7.0

public function check_authentication_error( $error ) {
	// Pass through other errors.
	if ( ! empty( $error ) ) {
		return $error;
	}

	return $this->get_error();
}