woocommerce_update_order хук-событиеWC 1.0

Использование

add_action( 'woocommerce_update_order', 'wp_kama_woocommerce_update_order_action', 10, 2 );

/**
 * Function for `woocommerce_update_order` action-hook.
 * 
 * @param  $order_id 
 * @param  $order    
 *
 * @return void
 */
function wp_kama_woocommerce_update_order_action( $order_id, $order ){

	// action...
}
$order_id
-
$order
-

Где вызывается хук

OrdersTableDataStore::update()
woocommerce_update_order
WC_Order_Data_Store_CPT::update()
woocommerce_update_order
WC_API_Orders::edit_order()
woocommerce_update_order
woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php 2518
do_action( 'woocommerce_update_order', $order->get_id(), $order ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
woocommerce/includes/data-stores/class-wc-order-data-store-cpt.php 196
do_action( 'woocommerce_update_order', $order->get_id(), $order );
woocommerce/includes/legacy/api/v3/class-wc-api-orders.php 666
do_action( 'woocommerce_update_order', $order->get_id() );
woocommerce/includes/legacy/api/v2/class-wc-api-orders.php 629
do_action( 'woocommerce_update_order', $order->get_id() );

Где используется хук в WooCommerce

woocommerce/src/Internal/Admin/Schedulers/OrdersScheduler.php 42
add_action( 'woocommerce_update_order', array( __CLASS__, 'possibly_schedule_import' ) );
woocommerce/src/Internal/DataStores/Orders/DataSynchronizer.php 111
self::add_action( 'woocommerce_update_order', array( $this, 'handle_updated_order' ), 100 );