0

I am new to woocommerce and php. I want a product display price of 1 unit to show on woocommerce emails. Right now There is Product name, Quantity, And Price tab. Price is not actual amount it is total bill shown in attached image.

Example a product is $45 and a quantity is 4 So email format should be Product Amount Quantity Price

I tried editing woocommerce/emails/customer-processing-order.php file by adding customn code

function cw_add_wc_order_email_images( $output, $order ) {
   static $run = 0;
   if ( $run ) {
        return $output;
    }
   $args = array(
        'order'                 => $order,
        'items'                 => $order->get_items(),
        'show_download_links'   => $show_download_links,
        'show_sku'              => $show_sku,
        'show_purchase_note'    => $show_purchase_note,
        'show_image'    => true,
        'image_size'    => array( 100, 50 )
    );
   $run++;
   return $order->email_order_items_table( $args );
}
add_filter( 'woocommerce_email_order_items_table', 'cw_add_wc_order_email_images' );

shown on this link https://www.cloudways.com/blog/add-product-images-skus-to-woocommerce-order-emails/

but it didn't worked

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.