Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi!
    You can do this by filtering the total values with the following code snippet in your theme functions (functions.php – read this if you haven’t edited that file before!):

    add_filter( 'wpo_wcpdf_woocommerce_totals', 'wpo_wcpdf_woocommerce_totals', 10, 2 );
    function wpo_wcpdf_woocommerce_totals ( $totals, $order ) {
    	if (!isset($totals['order_total'])) {
    		return $totals;
    	}
    
    	// get first 4 characters of the 'includes' text (for i18n)
    	$includes = substr(__( '(Includes %s)', 'woocommerce' ), 0, 4);
    	// prepend br tag and replace
    	$totals['order_total']['value'] = str_replace($includes, '<br>'.$includes, $totals['order_total']['value']);
    
    	return $totals;
    }

    If you need more tax details in your invoice, I can really recommend the premium template pack.

    Hope that helps!

    Ewout

    Thread Starter NumZie

    (@numzie)

    Hi Ewout

    Thanks.

    I’ll give it a try.

    Yes, I’m aware of both your templates and the premium features, and I defintely consider these. I am currently a startup in my spare time so I try to keep costs down and start out with the minimum viable solution ??

    Plugin Contributor Ewout

    (@pomegranate)

    No problem, I fully understand where you’re coming from!

    Let me know if you have any other questions & have a great day!

    Ewout

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to split total amount and vat amount’ is closed to new replies.