Viewing 1 reply thread
You must be logged in to reply to this topic.
Hello.
I would like to have related products by category only.
The problem is that, actually, it seems totally random.
I’ve tried with booster for woocommerce (https://booster.io/about/) but is not working.
How can i do this?
Thanks in advance.
Gianmaria Generoso
Hello,
This is a customization not included in support actually but i did some research and this is what i found:
According to: https://github.com/woocommerce/woocommerce/issues/850
Create a woocommerce/templates/single-product directory in your child theme (it’s better to use a child theme so you can make changes and not worry about future theme/plugin updates as they do not get overwritten) folder then add a related.php file. In the file, use this code. https://pastebin.com/LKRRSNXV
Apparently there is no available filter for the woocommerce_related_products function query so this is the only solution we can suggest for now.
Let us know.
Best regards!
You must be logged in to reply to this topic.