Archived topic
related products problems
1 reply · Started by raul on May 7, 2021
Hello, it seems the array function doesn't target all products within a subcategory with the related products, it shows a few and repeats itself and some subcategories products don't show at all. Is there a way to set it so it show products within the category and or subcategory?
Hi there,
GP isn't responsible for that functionality - its all under Woocommerce.
There is a filter for changing its behaviour: woocommerce_get_related_product_cat_terms
And i used that to find this article which sounds like it does what you need:
https://www.blazeconcepts.co.uk/2020/10/woocommerce-related-products-show-only-same-sub-category/