Added instead of ->get_image_id()
This commit is contained in:
parent
0f4ccb836e
commit
fe38d20f51
|
@ -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(
|
|||
<div class="<?php echo esc_attr( implode( ' ', array_map( 'sanitize_html_class', $wrapper_classes ) ) ); ?>" data-columns="<?php echo esc_attr( $columns ); ?>" style="opacity: 0; transition: opacity .25s ease-in-out;">
|
||||
<figure class="woocommerce-product-gallery__wrapper">
|
||||
<?php
|
||||
if ( $product->get_image_id() ) {
|
||||
if ( $post_thumbnail_id ) {
|
||||
$html = wc_get_gallery_image_html( $post_thumbnail_id, true );
|
||||
} else {
|
||||
$html = '<div class="woocommerce-product-gallery__image--placeholder">';
|
||||
|
|
Loading…
Reference in New Issue