Skip to content

Commit

Permalink
Fixed extraneous non-existing variation images in product teasers. (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauricio Urrego authored Apr 27, 2021
1 parent 471be5e commit c9509cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WooCommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public static function woocommerce_template_loop_product_thumbnail() {
"SELECT pm.meta_value AS attachment_id
FROM wp_posts p
INNER JOIN wp_postmeta pm ON pm.post_id = p.ID AND pm.meta_key = '_thumbnail_id'
WHERE p.ID IN ($placeholders)
WHERE p.ID IN ($placeholders) AND pm.meta_value > 0
ORDER BY p.menu_order ASC",
$variation_ids
)
Expand Down

0 comments on commit c9509cd

Please sign in to comment.