woocommerce_hpos_post_record_migrated_on_read action-hookWC 8.5.0

Fired when an HPOS order is updated from its corresponding post record on read due to a difference in the data.

Usage

add_action( 'woocommerce_hpos_post_record_migrated_on_read', 'wp_kama_woocommerce_hpos_post_record_migrated_on_read_action', 10, 2 );

/**
 * Function for `woocommerce_hpos_post_record_migrated_on_read` action-hook.
 * 
 * @param \WC_Order $order The order object.
 * @param array     $diff  Difference between HPOS data and post data.
 *
 * @return void
 */
function wp_kama_woocommerce_hpos_post_record_migrated_on_read_action( $order, $diff ){

	// action...
}
$order(\WC_Order)
The order object.
$diff(array)
Difference between HPOS data and post data.

Changelog

Since 8.5.0 Introduced.

Where the hook is called

OrdersTableDataStore::migrate_post_record()
woocommerce_hpos_post_record_migrated_on_read
woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php 1547
do_action( 'woocommerce_hpos_post_record_migrated_on_read', $order, $diff );

Where the hook is used in WooCommerce

Usage not found.