Answer the question
In order to leave comments, you need to log in
How to get thumbnail link in woocommerce?
By default, the image is displayed like this:
$thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
<a href="http://site.ru/dev.ru/product/%d0%bf%d1%80%d0%be%d0%b1%d0%bd%d1%8b%d0%b9-%d1%82%d0%be%d0%b2%d0%b0%d1%80/"><img width="143" height="107" src="//site.ru/dev.ru/wp-content/uploads/2017/07/tg2.png" class="attachment-shop_thumbnail size-shop_thumbnail wp-post-image" alt=""></a>
Answer the question
In order to leave comments, you need to log in
the_post_thumbnail_url
or get_the_post_thumbnail_url .
global $post;
<?php echo get_the_post_thumbnail_url($post->ID, 'shop_thumbnail'); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question