Automattic\WooCommerce\Internal\OrderWithdrawal

OrderWithdrawalFormProcessor::mark_order_withdrawal_requested │ private │ WC 1.0

Mark a matched order as having a submitted withdrawal request.

Method of the class: OrderWithdrawalFormProcessor{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->mark_order_withdrawal_requested( $order ): void;
$order(WC_Order) (required)
Matched order.

OrderWithdrawalFormProcessor::mark_order_withdrawal_requested() code WC 11.1.2

private function mark_order_withdrawal_requested( WC_Order $order ): void {
	try {
		$order->update_meta_data( self::ORDER_WITHDRAWAL_REQUESTED_META_KEY, self::ORDER_WITHDRAWAL_REQUESTED_VALUE );
		$order->save_meta_data();
	} catch ( Throwable $e ) {
		$this->log_order_meta_error( $order, $e );
	}
}