You need to get_the_category()
of the product post and then set category
in get_posts()
to that category’s $category->term_id
.
You need to get_the_category()
of the product post and then set category
in get_posts()
to that category’s $category->term_id
.