'Add information like store address in order email
I have a Woocommerce website and I need to add the store address into the email template of the order. I would like to add the "Method Description" that include our store address into the email of the order. Is it possible? The value of "Method Description" is: value="flexible_shipping_single:12"
How can I operate in this way? Which email template I have to edit?
Solution 1:[1]
I didn't completely understand your question. But I think this is what you need. If you need to add a new row to the order table to show method description, then you don't have to edit any WooCommerce email templates to achieve this. You can make use of the filter woocommerce_get_order_item_totals. Following is an example
add_filter( 'woocommerce_get_order_item_totals', 'add_method_description', 10, 2 );
function add_method_description( $total_rows, $order ) {
$total_rows['method_description'] = array(
'label' => __( 'Your Label', 'woocommerce' ),
'value' => 'value here'
);
return $total_rows;
}
You can write code to get the value and pass it here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | melvin |

