WC_REST_WCCOM_Site_Installer_Error{}
WCCOM Site Installer Error Class
No Hooks.
Usage
$WC_REST_WCCOM_Site_Installer_Error = new WC_REST_WCCOM_Site_Installer_Error(); // use class methods
Methods
- public __construct( $error_code, $error_message = null, $http_code = null )
- public get_error_code()
- public get_error_message()
- public get_http_code()
WC_REST_WCCOM_Site_Installer_Error{} WC REST WCCOM Site Installer Error{} code WC 9.3.3
class WC_REST_WCCOM_Site_Installer_Error extends Exception { /** * Constructor for the Installer Error class. * * @param string $error_code Error code. * @param string $error_message Error message. * @param int $http_code HTTP status code. */ public function __construct( $error_code, $error_message = null, $http_code = null ) { $this->error_code = $error_code; $this->error_message = $error_message ?? WC_REST_WCCOM_Site_Installer_Error_Codes::ERROR_MESSAGES[ $error_code ] ?? ''; $this->http_code = $http_code ?? WC_REST_WCCOM_Site_Installer_Error_Codes::HTTP_CODES[ $error_code ] ?? 400; parent::__construct( $error_code ); } /** * Get the error code. */ public function get_error_code() { return $this->error_code; } /** * Get the error message. */ public function get_error_message() { return $this->error_message; } /** * Get the HTTP status code. */ public function get_http_code() { return $this->http_code; } }