Get the first array item for the alt_text. (#35009)
This commit is contained in:
commit
f4af1b7a84
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Improve the way we retrieve the alt text property for product attachments.
|
|
@ -788,7 +788,7 @@ function wc_get_product_attachment_props( $attachment_id = null, $product = fals
|
|||
}
|
||||
|
||||
$alt_text = array_filter( $alt_text );
|
||||
$props['alt'] = isset( $alt_text[0] ) ? $alt_text[0] : '';
|
||||
$props['alt'] = $alt_text ? reset( $alt_text ) : '';
|
||||
|
||||
// Large version.
|
||||
$full_size = apply_filters( 'woocommerce_gallery_full_size', apply_filters( 'woocommerce_product_thumbnails_large_size', 'full' ) );
|
||||
|
|
Loading…
Reference in New Issue