Trying to make a PHP code that generate a short code to implement into a plugin that create custom emails for Woocommerce, I want to show ONLY the product image(100x100) with the short code, my attempt is
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if(isset($attr['type']) && $attr['type'] == 'product-image')
{
echo $order->email_order_items_table( array(
'show_image' => true,
'image_size' => array( 100, 100 ),
) );
}
?>
Although the short code currently works, and the product image appears in the email, is showed with other information I can't remove like product name, quantity bought and price. It should be obvious because I’m using email_order_items_table, but I didn’t find other way to bring the image. I would like to show ONLY the image with no additional information, what I can do?
Thank you in advance