Automattic\WooCommerce\Internal\DataStores\Orders
DataSynchronizer::handle_updated_order
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.
Returns
null. Nothing (null).
Usage
$DataSynchronizer = new DataSynchronizer(); $DataSynchronizer->handle_updated_order( $order_id ): void;
- $order_id(int) (required)
- The order id.
DataSynchronizer::handle_updated_order() DataSynchronizer::handle updated order code WC 10.3.3
public 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 ) );
}
}