Automattic\WooCommerce\Checkout\Helpers
ReserveStockException::__construct() public WC 1.0
Setup exception.
{} Это метод класса: ReserveStockException{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$ReserveStockException = new ReserveStockException(); $ReserveStockException->__construct( $code, $message, $http_status_code, $data );
- $code(строка) (обязательный)
- Machine-readable error code, e.g woocommerce_invalid_product_id.
- $message(строка) (обязательный)
- User-friendly translated error message, e.g. 'Product ID is invalid'.
- $http_status_code(число)
- Proper HTTP status code to respond with, e.g. 400.
- $data(массив)
- Extra error data.
Код ReserveStockException::__construct() ReserveStockException:: construct WC 5.0.0
public function __construct( $code, $message, $http_status_code = 400, $data = array() ) {
$this->error_code = $code;
$this->error_data = $data;
parent::__construct( $message, $http_status_code );
}