| Server IP : 145.239.37.162 / Your IP : 216.73.217.71 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www1/wp-content/themes/transpix/woocommerce/includes/api/ |
Upload File : |
<?php
/**
* WooCommerce REST Exception Class
*
* Extends Exception to provide additional data.
*
* @author WooThemes
* @category API
* @package WooCommerce/API
* @since 2.6.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WC_REST_Exception extends Exception {
/**
* Sanitized error code.
*
* @var string
*/
protected $error_code;
/**
* Setup exception.
*
* @param string $error_code Machine-readable error code.
* @param string $error_message User-friendly translated error message.
* @param int $http_status_code HTTP status code to respond with.
*/
public function __construct( $error_code, $error_message, $http_status_code ) {
$this->error_code = $error_code;
parent::__construct( $error_message, $http_status_code );
}
/**
* Returns the error code.
*
* @return string
*/
public function getErrorCode() {
return $this->error_code;
}
}