LLMS_Order_Generator::error( string $code, string $message, array $extra_data = array() )
Returns an error object.
Description Description
This method accepts an error code and message and passes them directly to WP_Error
and adds all class variables to the error objects $data
parameter.
Parameters Parameters
- $code
-
(string) (Required) Error code.
- $message
-
(string) (Required) Error message.
- $extra_data
-
(array) (Optional) Additional data to pass to WP_Error's 3rd parameter.
Default value: array()
Return Return
(WP_Error)
Source Source
File: includes/class-llms-order-generator.php
protected function error( $code, $message, $extra_data = array() ) { $data = get_class_vars( __CLASS__ ); foreach ( $data as $key => &$val ) { $val = $this->{$key}; } return new WP_Error( $code, $message, array_merge( $data, $extra_data ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |