WC_REST_Authentication::check_authentication_error()publicWC 1.0

Check for authentication error.

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

Хуков нет.

Возвращает

WP_Error|null|true|false.

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

$WC_REST_Authentication = new WC_REST_Authentication();
$WC_REST_Authentication->check_authentication_error( $error );
$error(WP_Error|null|true|false) (обязательный)
Error data.

Код WC_REST_Authentication::check_authentication_error() WC 8.7.0

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

	return $this->get_error();
}