Upsells should not include the current product
This commit is contained in:
parent
4817c324c2
commit
1c01ad3f1c
|
@ -21,7 +21,8 @@ $args = array(
|
|||
'no_found_rows' => 1,
|
||||
'posts_per_page' => $posts_per_page,
|
||||
'orderby' => $orderby,
|
||||
'post__in' => $upsells
|
||||
'post__in' => $upsells,
|
||||
'post__not_in' => array($product->id)
|
||||
);
|
||||
|
||||
$products = new WP_Query( $args );
|
||||
|
@ -48,4 +49,4 @@ if ( $products->have_posts() ) : ?>
|
|||
|
||||
<?php endif;
|
||||
|
||||
wp_reset_postdata();
|
||||
wp_reset_postdata();
|
||||
|
|
Loading…
Reference in New Issue