woocommerce_analytics_update_product
Fires when product's reports are updated.
Usage
add_action( 'woocommerce_analytics_update_product', 'wp_kama_woocommerce_analytics_update_product_action', 10, 2 ); /** * Function for `woocommerce_analytics_update_product` action-hook. * * @param int $order_item_id Order Item ID. * @param int $order_id Order ID. * * @return void */ function wp_kama_woocommerce_analytics_update_product_action( $order_item_id, $order_id ){ // action... }
- $order_item_id(int)
- Order Item ID.
- $order_id(int)
- Order ID.
Where the hook is called
woocommerce_analytics_update_product
woocommerce/src/Admin/API/Reports/Products/DataStore.php 477
do_action( 'woocommerce_analytics_update_product', $order_item_id, $order->get_id() );