0

In Customer email order i have added show_image=true but its i am unable to see the image in email once i order.For this i have added code in function.php file but still unable to get the image in email.

These code I have added in functions.php file

// Adding image to customer order email
add_filter( 'woocommerce_email_order_items_args', 'custom_email_order_items_args', 10, 1 );
function custom_email_order_items_args( $args ) {
    $args['show_image'] = true;
    $args['image_size'] = array( 300, 300);
    return $args;
}

In Email order details i have changed the code in this format

<?php
    echo wc_get_email_order_items( $order, array( // WPCS: XSS ok.
        'show_sku'      => $sent_to_admin,
        'show_image'    => true,
        'image_size'    => array( 150, 150 ),
        'plain_text'    => $plain_text,
        'sent_to_admin' => $sent_to_admin,
    ));
?>

But checking the email template the code was this

<?php
    do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
    do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
    do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
?>

But not getting why the image is not displaying in email.

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
tester
  • 429
  • 5
  • 20
  • Does [this answer](https://stackoverflow.com/questions/53608751/display-the-product-image-in-woocommerce-email-notifications/53609183#53609183) don't work anymore? – LoicTheAztec Dec 21 '18 at 14:19
  • @LoicTheAztec iam getting blank in image place getting image in checkout page as well as in thankyou page but in email its not working – tester Dec 22 '18 at 05:14

0 Answers0