I've been trying to figure out a way to bulk add all the product categories from WooCommerce without having to add them manually through Appearance -> Menu.
I need their hierarchy to follow but I haven't found anything to help me at all. Mega Menu Plugins are a no go, I would like a custom solution.
Even if I would like to add them manually, the menu doesn't even show all the sub-categories.
There are 400+ product categories in this woocommerce site. So way too long to do manually anyway.
I tried using chatgpt to generate code that would help me bulk add all the prod. cat. from functions.php. It worked but the hierarchy didn't follow and the menu order didn't make sense. There is up to 3 level of hierarchy and I want to display them like a mega menu with multiple column (which I will achieve by customizing CSS) but I first need to import them in the wordpress menu.
Hope this is clear enough.