MailPoet\EmailEditor\Validator
Validation_Exception::create_from_wp_error()
Creates a new instance of the exception.
Method of the class: Validation_Exception{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = Validation_Exception::create_from_wp_error( $wp_error ): self;
- $wp_error(WP_Error) (required)
- WP_Error instance.
Validation_Exception::create_from_wp_error() Validation Exception::create from wp error code WC 9.8.1
public static function create_from_wp_error( WP_Error $wp_error ): self { $exception = self::create() ->withMessage( $wp_error->get_error_message() ); $exception->wp_error = $wp_error; return $exception; }