Could not find the answer to this question in Google)). Is it possible to add a product photo in the order details in my account? (/ my-account / view-order / 305 /) And poke in which direction to pick. Thank.
- What does it mean - did the order? What is the checkout page? - KAGG Design
- In my account - test.com/my-account/view-order/305/ - Oleg Sviridov
|
2 answers
The order details are displayed in a template.
/wp-content/plugins/woocommerce/templates/order/order-details-item.php .
Copy this file to
/wp-content/themes/ваша-тема/woocommerce/order/order-details-item.php
and edit as you need.
- I'm not good at php, just learning. Could you tell us in more detail how to get this evil picture - Oleg Sviridov
|
In the file order-details.php add this:
<th class="product-thumb"><?php _e( 'Image', 'woocommerce' ); ?></th> In the file order-details-item.php add this:
<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> |