Don't display Upsells collection if there's no upsells
This commit is contained in:
parent
9168c15031
commit
793847b250
|
@ -1887,8 +1887,10 @@ class ProductCollection extends AbstractBlock {
|
|||
);
|
||||
}
|
||||
|
||||
$upsells = $product->get_upsell_ids();
|
||||
|
||||
return array(
|
||||
'post__in' => $product->get_upsell_ids(),
|
||||
'post__in' => empty( $upsells ) ? array( -1 ) : $upsells,
|
||||
);
|
||||
},
|
||||
function ( $collection_args, $query ) {
|
||||
|
|
Loading…
Reference in New Issue