Automattic\WooCommerce\Api

UnauthorizedException::__constructpublicWC 1.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$UnauthorizedException = new UnauthorizedException();
$UnauthorizedException->__construct( $message, $extensions, ?\Throwable $previous,  );
$message(строка)
The error message.
По умолчанию: 'Authentication required.'
$extensions(массив)
Additional error metadata to surface in the GraphQL extensions object.
По умолчанию: array()
?\Throwable $previous

.
По умолчанию: null

(обязательный)

.

Код UnauthorizedException::__construct() WC 10.9.1

public function __construct(
	string $message = 'Authentication required.',
	array $extensions = array(),
	?\Throwable $previous = null,
) {
	parent::__construct( $message, 'UNAUTHORIZED', $extensions, 401, $previous );
}