When we interact with large number of product and categories in WooCommerce then sometimes it’s very time consuming to enable/disable bulk categories in frontend.
Here is a simple WooCommerce addon plugin from my github repo to make bulk action in categories.
Download zip of the plugin or create custom with below code.
Category Tree Plugin
Don’t forgot to put 2 icons (Expand/Collapse) in plugin directory.