Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 2230f68

Browse files
Remove placeholder image rendering as it's covered in Core function get_image anyway (#12098)
Co-authored-by: Daniel Dudzic <[email protected]>
1 parent 7b3bafe commit 2230f68

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/BlockTypes/ProductImage.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,6 @@ private function render_image( $product, $attributes ) {
162162
$image_style .= sprintf( 'aspect-ratio:%s;', $attributes['aspectRatio'] );
163163
}
164164

165-
if ( ! $product->get_image_id() ) {
166-
// The alt text is left empty on purpose, as it's considered a decorative image.
167-
// More can be found here: https://www.w3.org/WAI/tutorials/images/decorative/.
168-
// Github discussion for a context: https://github.com/woocommerce/woocommerce-blocks/pull/7651#discussion_r1019560494.
169-
return wc_placeholder_img(
170-
$image_size,
171-
array(
172-
'alt' => '',
173-
'style' => $image_style,
174-
)
175-
);
176-
}
177-
178165
return $product->get_image(
179166
$image_size,
180167
array(

0 commit comments

Comments
 (0)