diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index e03b084b942..aff8a276672 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -1426,6 +1426,7 @@ function wc_get_gallery_image_html( $attachment_id, $main_image = false ) { $full_size = apply_filters( 'woocommerce_gallery_full_size', apply_filters( 'woocommerce_product_thumbnails_large_size', 'full' ) ); $thumbnail_src = wp_get_attachment_image_src( $attachment_id, $thumbnail_size ); $full_src = wp_get_attachment_image_src( $attachment_id, $full_size ); + $alt_text = trim( wp_strip_all_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) ); $image = wp_get_attachment_image( $attachment_id, $image_size, @@ -1447,7 +1448,7 @@ function wc_get_gallery_image_html( $attachment_id, $main_image = false ) { ) ); - return '
'; + return ''; } if ( ! function_exists( 'woocommerce_output_product_data_tabs' ) ) {