Hi @georgeince,
You can add a VAT row. Please edit the function wcdn_content
in includes/wcdn-template-functions.php
file.
In that, make the below changes. Add this line, which attaches the function to the WooCommerce filter.
add_filter( 'woocommerce_get_order_item_totals', 'wcdn_add_vat', 40, 2 );
The function body looks like below:
function wcdn_add_vat( $total_rows, $order ) {
$wdn_order_currency = ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', ">=" ) ) ? $order->get_currency() : $order->get_order_currency();
// replace the amount here with the actual VAT
$vat_amount = 15.50;
$vat_display = wc_price( $vat_amount, array( 'currency' => $wdn_order_currency ) );
$vat_row[ 'VAT' ][ 'label' ] = 'VAT';
$vat_row[ 'VAT' ][ 'value' ] = $vat_display;
$updated_order_total = $order->get_total() + $vat_amount;
$total_rows['order_total']['value'] = wc_price( $updated_order_total, array( 'currency' => $wdn_order_currency ) );
$total_rows = $vat_row + $total_rows;
return $total_rows;
}
This is how the invoice will appear after the above changes: https://screencast.com/t/bqMeJr31hL
:Vishal