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.