Automattic\WooCommerce\Internal\Caches

OrdersVersionStringInvalidator::handle_woocommerce_update_orderpublicWC 10.6.0

Handle the woocommerce_update_order hook.

Method of the class: OrdersVersionStringInvalidator{}

No Hooks.

Returns

null. Nothing (null).

Usage

$OrdersVersionStringInvalidator = new OrdersVersionStringInvalidator();
$OrdersVersionStringInvalidator->handle_woocommerce_update_order( $order_id, $order ): void;
$order_id(int) (required)
The order ID.
$order(WC_Order) (required)
The order object.

Changelog

Since 10.6.0 Introduced.

OrdersVersionStringInvalidator::handle_woocommerce_update_order() code WC 10.8.1

public function handle_woocommerce_update_order( $order_id, $order ): void {
	$order_id = (int) $order_id;
	$this->invalidate( $order_id );

	if ( $this->did_customer_change( $order_id, $order ) ) {
		$this->invalidate_orders_list();
	}

	unset( $this->pre_save_customer_ids[ $order_id ] );
}