get_gallery_image_ids(); $props = wc_get_product_attachment_props( get_post_thumbnail_id(), $post ); $image = get_the_post_thumbnail( $post->ID, 'shop_single', array( 'title' => $props['title'], 'alt' => $props['alt'], ) ); echo sprintf( '
  • %s
  • ', 'woocommerce-product-gallery__image', $image // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); if ( $attachment_ids ) { $loop = 0; foreach ( $attachment_ids as $attachment_id ) { $props = wc_get_product_attachment_props( $attachment_id, $post ); if ( ! $props['url'] ) { continue; } echo sprintf( '
  • %s
  • ', 'woocommerce-product-gallery__image', wp_get_attachment_image( $attachment_id, 'shop_single', 0, $props ) ); $loop++; } } } else { echo sprintf( '
  • %s
  • ', wc_placeholder_img_src(), __( 'Placeholder', 'oceanwp' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?>