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