woocommerce add a new bulk action in the bulk actions dropdown in the orders list

I'm trying to add a custom bulk action in the WooCommerce orders list that will a piece of code I've made for individual orders but need to make it work recursively.

I'm aware of that: Custom bulk_action but it is referring to wordpress bulk action menus and not specifically for woocommerce.

could you please help me get it working in my plugin for woocommerce orders list?

Furthermore, I'm also a bit stuck about how, after adding that action, to scan which orders are checked and apply the bulk action only on the selected orders.

Topic woocommerce-offtopic bulk plugin-development Wordpress

Category Web


As LoicTheAztec commented, the post here Using custom bulk actions on admin orders list in Woocommerce 3 helped me to make the code for my plugin. Although it mentions that you should use the functions.php to make it work, I was able to implement it perfectly in my own plugin code.

Thanks, Loic. I appreciate it.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.