WooCommerce Code Reference

Api

Namespaces

Attributes
Enums
Infrastructure
InputTypes
Interfaces
Mutations
Pagination
Queries
Scalars
Traits
Types
Utils

Interfaces, Classes and Traits

ApiException
Exception for API errors with error codes and extensions.
ForbiddenException
Thrown to signal that the caller is authenticated but lacks permission to perform the requested operation, e.g. the right user but the wrong role, scope, or capability.
InvalidTokenException
Thrown to signal that authentication credentials were supplied but are invalid, e.g. an unrecognised API token, a malformed Authorization header, or expired credentials.
NotFoundException
Thrown to signal that the requested resource doesn't exist.
UnauthorizedException
Thrown to deny access with a 401 Unauthorized status.
ValidationException
Thrown to signal that input is well-formed but failed business-rule validation, e.g. a required field was empty, two fields contradict each other, a value violates a domain constraint.