post_excerpt; $image_link = wp_get_attachment_url( get_post_thumbnail_id() ); $image_metadata = wp_get_attachment_metadata( get_post_thumbnail_id() ); $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array( 'title' => $image_title, 'alt' => $image_title ) ); //Add Feature Image echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '%s', $image_link, $image_caption, $image_metadata['width'], $image_metadata['height'], $image ), $post->ID ); //Add the rest of the images $attachment_ids = $product->get_gallery_attachment_ids(); if ( $attachment_ids ) { foreach ( $attachment_ids as $attachment_id ) { $image_link = wp_get_attachment_url( $attachment_id ); $image_metadata = wp_get_attachment_metadata( $attachment_id ); if ( ! $image_link ) continue; $image = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ) ); $image_title = esc_attr( get_the_title( $attachment_id ) ); echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '%s', $image_link, $image_title, $image_metadata['width'], $image_metadata['height'], $image ), $attachment_id, $post->ID); } } } else { echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '%s', wc_placeholder_img_src(), __( 'Placeholder', 'caos' ) ), $post->ID ); } ?>