WC_Abstract_Order::handle_exception
Log an error about this order is exception is encountered.
Method of the class: WC_Abstract_Order{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->handle_exception( $e, $message );
- $e(Exception) (required)
- Exception object.
- $message(string)
- Message regarding exception thrown.
Default: 'Error'
Changelog
| Since 3.7.0 | Introduced. |
WC_Abstract_Order::handle_exception() WC Abstract Order::handle exception code WC 10.4.3
protected function handle_exception( $e, $message = 'Error' ) {
wc_get_logger()->error(
$message,
array(
'order' => $this,
'error' => $e,
)
);
}