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.
Метод класса: DataSynchronizer{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->handle_updated_order( $order_id ): void;
- $order_id(int) (обязательный)
- The order id.
Код DataSynchronizer::handle_updated_order() DataSynchronizer::handle updated order 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 ) ); } }