woocommerce_analytics_delete_product
Fires when product's reports are removed from database.
Usage
add_action( 'woocommerce_analytics_delete_product', 'wp_kama_woocommerce_analytics_delete_product_action', 10, 2 ); /** * Function for `woocommerce_analytics_delete_product` action-hook. * * @param int $product_id Product ID. * @param int $order_id Order ID. * * @return void */ function wp_kama_woocommerce_analytics_delete_product_action( $product_id, $order_id ){ // action... }
- $product_id(int)
- Product ID.
- $order_id(int)
- Order ID.
Where the hook is called
woocommerce_analytics_delete_product
woocommerce/src/Admin/API/Reports/Products/DataStore.php 516
do_action( 'woocommerce_analytics_delete_product', 0, $order_id );