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.
Return
null
. Nothing (null).
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() DataSynchronizer::handle updated order code WC 9.5.1
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 ) ); } }