V
V
VPVPVP2021-03-04 17:25:36
WooCommerce
VPVPVP, 2021-03-04 17:25:36

How to display a picture of the selected variation instead of the current one?

There is a self-written template, where, as it turned out, they did not provide for the output of a product thumbnail based on the selected variation.
Now there is displayed only a picture which is Images of the product.
What piece of code can display the variation image instead of the current one?

Now it's just pasted like this

<!-- product_card__slider_big-->
    <div class="product_card__slider_big">
      <div class="js__prod_slider_big">
        <div class="item">
          <?php echo woocommerce_get_product_thumbnail(); ?>
        </div>
      </div>
    </div>
    <!-- product_card__slider_big-->
  <?php endif; ?>


What exactly do you need to change this piece of code to display the image of the selected variation?
<?php echo woocommerce_get_product_thumbnail(); ?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question