I apologize the delay here
The 2nd Tier fixed the main issue on your site.
To summarize:
WooCommerce Views depends on our Views plugin for display content. But the WooCommerce core plugin has three modes of display for product categories:
a.) Display product categories by products
b.) Display product categories by subcategories
c.) Display both.
You can see this setting in the WordPress backend through Products -> Categories and click "For her" as an example to edit.
(I missed that too 🙂 )
You should see the 'Display Type' field. There is where you can configure how the product categories are to be displayed.
The current limitation is that Views plugin only displays 'by products' when we are assigning a WordPress archive to a Product category.
As a result, when a product category has a subcategory, WooCommerce overrides it and and Views can no longer control this.
Therefore the solution of this problem are as follows:
1.) Ensure product categories are set to display as products
[...]edit-tags.php?action=edit&taxonomy=product_cat&tag_ID=185&post_type=product
So its consistent with Views.
2.) Create a new View that will solely display the product subcategory on a product category page.
The 2nd Tier created this on the site here:
[...]admin.php?page=views-editor&view_id=13825
This is the View that we where looking into to customize the styling on product subcategory pages so it would be consistent with the other product category archive looks.
3.) Use the WooCommerce Views new conditional built-in function (new in version 2.5.3) woo_has_product_subcategory() to check if the loaded product category page has a subcategory.
Implement this with wpv-if on 'Products, Product Categories' WordPress archive View:
[...]/admin.php?page=views-editor&view_id=13825
This is the revised markup on the loop output:
<div class="breadcrumbs">[yoast-breadcrumbs]</div>
[wpv-layout-start]
[wpv-if evaluate="woo_has_product_subcategory() = 0"]
[wpv-items-found]
<!-- wpv-loop-start -->
[wpv-add-to-cart-message]
<ul class="products">
<wpv-loop>
<li class="item"><a href="[wpv-post-url]" class="product-link">
<div class="bg product-title">[wpv-post-title output="sanitize"]</div>
<img height="200" class="attachment-shop_catalog wp-post-image" src="[wpv-woo-product-image size="shop_catalog" output="raw" gallery_on_listings="no"]">
</a>
[wpv-woo-product-price]
<div class="add_to_cart">
[wpv-woo-buy-or-select add_to_cart_text="Buy Now" link_to_product_text="More Info" show_quantity_in_button="yes" show_variation_options="no"]
</div>
</li>
</wpv-loop>
</ul>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<strong>[wpml-string context="wpv-views"]No posts found[/wpml-string]</strong>
[/wpv-no-items-found]
[/wpv-if]
[wpv-if evaluate="woo_has_product_subcategory() = 1"]
[wpv-view name="Customize Product SubCategory"]
[/wpv-if]
[wpv-layout-end]
How it works:
When a product category with subcategory is loaded, e.g. here:
[...]product-category/for-her/
woo_has_product_subcategory() returns 1 and executes the 'Customize Product SubCategory' View. This View is responsible for displaying the product subcategories and this is where we can add styling ,etc for subcategories.
But when the product categories don't have subcategories on it but only display products 'woo_has_product_subcategory()' returns 0 and therefore execute the normal archive code just like it was before.
Does this help to solve the main issue of this thread?
Please don't hesitate to inform me in case you have further questions
Thank you for your patience.