I am trying to display cross sell products in woocommerce by category e.g.
$args = array( 'post_type' => 'product', 'ignore_sticky_posts' => 1, 'posts_per_page' => 1, 'no_found_rows' => 1, 'orderby' => 'name', 'post__in' => $crosssells, 'product_cat' => 'mattresses', );
The product needs to be a cross sell and in the exact category to be displayed but the above code displays the product from the category even if it’s not a cross sell.
anyone able to help with this, driving me crazy trying to find a solution
bump, this is the only thing holding me back launching the website (and getting paid).
Am I looking at this the wrong way?