woocommerce_analytics_delete_coupon
Fires when coupon's reports are removed from database.
Использование
add_action( 'woocommerce_analytics_delete_coupon', 'wp_kama_woocommerce_analytics_delete_coupon_action', 10, 2 ); /** * Function for `woocommerce_analytics_delete_coupon` action-hook. * * @param int $coupon_id Coupon ID. * @param int $order_id Order ID. * * @return void */ function wp_kama_woocommerce_analytics_delete_coupon_action( $coupon_id, $order_id ){ // action... }
- $coupon_id(int)
- Coupon ID.
- $order_id(int)
- Order ID.
Где вызывается хук
woocommerce/src/Admin/API/Reports/Coupons/DataStore.php 479
do_action( 'woocommerce_analytics_delete_coupon', 0, $order_id );