Automattic\WooCommerce\Internal\OrderWithdrawal
OrderWithdrawalFormProcessor::log_order_meta_error
Log an order meta failure without failing the submission.
Method of the class: OrderWithdrawalFormProcessor{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->log_order_meta_error( $order, $e ): void;
- $order(WC_Order) (required)
- Matched order.
- $e(Throwable) (required)
- Order meta error.
OrderWithdrawalFormProcessor::log_order_meta_error() OrderWithdrawalFormProcessor::log order meta error code WC 11.1.2
private function log_order_meta_error( WC_Order $order, Throwable $e ): void {
wc_get_logger()->warning(
sprintf(
'Order withdrawal meta flag could not be added to order %1$d. Error: %2$s',
$order->get_id(),
$e->getMessage()
),
array( 'source' => self::LOGGER_SOURCE )
);
}