WooCommerce Code Reference

Validation_Exception extends UnexpectedValueException
in package

Exception thrown when validation fails.

Table of Contents

$wp_error  : WP_Error
WP_Error instance.
$errors  : array<string|int, string>
__construct()  : mixed
create()  : static
create_from_wp_error()  : self
Creates a new instance of the exception.
get_wp_error()  : WP_Error
Returns the WP_Error instance.
getErrors()  : array<string|int, mixed>
getHttpStatusCode()  : int
withCode()  : static
withError()  : static
withErrors()  : static
withMessage()  : static

Properties

Methods

__construct()

public final __construct([string $message = '' ], int $code[, Throwable $previous = null ]) : mixed
Parameters
$message : string = ''
$code : int
$previous : Throwable = null
Return values
mixed