Hi there,
Thanks for your message and for clarifying what you’re trying to achieve!
If I understand correctly, you’d like to detect when a coupon is removed from an order within the WooCommerce order editor in the WordPress dashboard (admin area), and then log the name of the removed coupon for tracking purposes.
At the moment, WooCommerce does not provide a dedicated hook specifically for coupon removal within the admin order editor. The hook you tried — woocommerce_order_remove_coupon
— is designed for the frontend (Cart and Checkout pages), which is why it didn’t trigger in this case.
To achieve what you’re looking for, this would likely require some custom development, such as hooking into a more general action like save_post_shop_order
to detect changes to the order and compare applied coupons before and after the save process.
Since custom code and development work fall outside the scope of our support in this forum, I can recommend?WooExperts?and?Codeable.io?as options for getting professional help. Alternatively, you can also ask your development questions in the??WooCommerce Community Slack.
Thank you