So I have decided I wanted 2 different templates for my Woocommerce shop.
I found a nice little chunk that basically told me to edit taxonomy-product_cat.php
All of my shop pages are category/archive pages. And My Parent Categories have about 50 Sub Cats a piece.
So My code is as follows in taxonomy-product_cat.php :
if (is_product_category( 'outdoor-furniture' ) ){ wc_get_template( 'archive-product.php' );
}
else { wc_get_template( 'archive-product-list.php' );
}
The problem is that archive-product.php is only being applied to the "outdoor-furniture" category and none of its subcategories.
I understand I could list || is_product_category( 'another-cat' ) but to do it for 50 is ridiculous.
I have tried several things for several hours. Stuff that involved filters to the functions file. If statements for this taxonomy-product_cat file. I cant seem to get anything working.
As always any help is greatly appreciated.
Cheers