get post thumbnail product woocommerce code example
Example 1: get product image woocommerce
// Use $post->ID to get from post object
$id = $loop->post->ID
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'single-post-thumbnail' );
<img src="<?php echo $image[0]; ?>" data-id="<?php echo $id; ?>" />
Example 2: wp+get feature image
<?php
echo get_the_post_thumbnail( $post_id, 'thumbnail' );
?>