questions

Show product image in WooCommerce email template

Rate this post

I am using the following code in my email template.

<?php echo wc_get_email_order_items($order, array( 'show_sku' => $sent_to_admin, 'show_image' => true, 'image_size' => array(75, 75), 'plain_text' => $plain_text, 'sent_to_admin' => $sent_to_admin, )); ?>

But using this code I am getting a product thumbnail, I want to get a featured image or full image. Plz help

 

✔️Solution:

wc_get_email_order_items($order, array( 'show_sku' => $sent_to_admin, 'show_image' => true, 'image_size' => 'full', 'plain_text' => $plain_text, 'sent_to_admin' => $sent_to_admin, ));

The parameter image_size – Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default ‘thumbnail’ (‘woocommerce_thumbnail’, ‘full’, ‘woocommerce_single’, ‘woocommerce_gallery_thumbnail’)

Leave a Reply

Your email address will not be published.

Back to top button