I am trying to find the parent category name when within a subcategory page on WooCommerce, i.e. I have 4 main categories.
Parent1
- Sub 1
- Sub 2
- Sub 3 etc
Parent2
- Sub 1
- Sub 2
- Sub 3 etc
and so on.
If I am on the list page for Sub2 which is a child of Parent1 I want to know the name of the Parent1 category.