diff --git a/templates/single-product/product-image.php b/templates/single-product/product-image.php index 0399028c8d8..d892b4b69b0 100644 --- a/templates/single-product/product-image.php +++ b/templates/single-product/product-image.php @@ -30,7 +30,7 @@ $wrapper_classes = apply_filters( 'woocommerce_single_product_image_gallery_classes', array( 'woocommerce-product-gallery', - 'woocommerce-product-gallery--' . ( $product->get_image_id() ? 'with-images' : 'without-images' ), + 'woocommerce-product-gallery--' . ( $post_thumbnail_id ? 'with-images' : 'without-images' ), 'woocommerce-product-gallery--columns-' . absint( $columns ), 'images', ) @@ -39,7 +39,7 @@ $wrapper_classes = apply_filters(