Code à insérer dans code snippet ou function.php afin d'ajouter un nouveau row avec la tva dans l'email de confirmation de commande.
add_filter( 'woocommerce_get_order_item_totals', 'insert_custom_line_order_item_totals', 10, 3 ); function insert_custom_line_order_item_totals( $total_rows, $order, $tax_display ){ // Only on emails notifications if( ! is_wc_endpoint_url() ) { // Change: Display only the gran total amount $total_rows['order_total']['value'] = strip_tags( wc_price( $order->get_total() ) ); // Create a new row for total tax $new_row = array( 'order_tax_total' => array( 'label' => __('VAT:','woocommerce'), 'value' => strip_tags( wc_price( $order->get_total_tax() ) ) ) ); // Add the new created to existing rows $total_rows += $new_row; } return $total_rows; }