Hook "wp_trash_post" executing multiple time in case of bulk trash products
I am currently using hook wp_trash_post
to trigger my custom API when a WooCommerce Product is trashed.
This is working fine for the case of single trash.
But, in case of Bulk trash this event is executing multiple times. for example if 3 products are selected to trash then this event will trigger 3 times.
I need different event for Bulk Trash which will execute one time but having all of product ids.
Hopefully it is clear to understand.
Please Help!
Topic woocommerce-offtopic Wordpress
Category Web