WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Checkout\Helpers

ReserveStock::release_stock_for_order() public WC 1.0

Release a temporary hold on stock for an order.

{} It's a method of the class: ReserveStock{}

No Hooks.

Return

null. Nothing.

Usage

$ReserveStock = new ReserveStock();
$ReserveStock->release_stock_for_order( $order );
$order(\WC_Order) (required)
Order object.

Code of ReserveStock::release_stock_for_order() WC 5.9.0

public function release_stock_for_order( $order ) {
	global $wpdb;

	if ( ! $this->is_enabled() ) {
		return;
	}

	$wpdb->delete(
		$wpdb->wc_reserved_stock,
		array(
			'order_id' => $order->get_id(),
		)
	);
}