Automattic\WooCommerce\Api
UnauthorizedException::__construct
Constructor.
Method of the class: UnauthorizedException{}
No Hooks.
Returns
null. Nothing (null).
Usage
$UnauthorizedException = new UnauthorizedException(); $UnauthorizedException->__construct( $message, $extensions, ?\Throwable $previous, );
- $message(string)
- The error message.
Default:'Authentication required.' - $extensions(array)
- Additional error metadata to surface in the GraphQL
extensionsobject.
Default:array() - ?\Throwable $previous
.
Default:null(required)
- .
UnauthorizedException::__construct() UnauthorizedException:: construct code WC 10.9.1
public function __construct(
string $message = 'Authentication required.',
array $extensions = array(),
?\Throwable $previous = null,
) {
parent::__construct( $message, 'UNAUTHORIZED', $extensions, 401, $previous );
}