@
@
@vareted2021-12-01 20:32:13
WordPress
@vareted, 2021-12-01 20:32:13

How to display product images in order information?

How can I display product images in the order information on the successful checkout page (Wordpress WooCommerce)?
Checkout stage: shopping cart -> page for entering data for placing an order -> page for successful checkout (and on this page, images of goods must be displayed in the order information).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Soul_Easy, 2021-12-17
@Soul_Easy

Add this to the order-details-item.php file:

<td class="product-thumb">
    <?php $thumb = get_the_post_thumbnail_url($item['product_id'], 'shop_catalog'); ?>
    <?php
        if(!empty($thumb)) {
           echo "<img src='{$thumb}'/>";
        }
    ?>
</td>

helped me

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question