Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::handle_updated_order()privateWC 1.0

Handle the woocommerce_update_order

When posts is authoritative and sync is enabled, updating a post triggers a corresponding change in the COT table.

Method of the class: DataSynchronizer{}

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->handle_updated_order( $order_id ): void;
$order_id(int) (required)
The order id.

DataSynchronizer::handle_updated_order() code WC 7.1.0

private function handle_updated_order( $order_id ): void {
	if ( ! $this->custom_orders_table_is_authoritative() && $this->data_sync_is_enabled() ) {
		$this->posts_to_cot_migrator->migrate_orders( array( $order_id ) );
	}
}