WooCommerce PDF Invoices & Packing Slips
[resolved] Order total for different tax classes (2 posts)

  1. indira14
    Posted 2 years ago #

    Hi! Hoping you can help me find a way to do the following:

    I would like the order total show on my pdf invoices like in the following example:

    [Order with products of 6% tax and 21% tax]

    Order total excluding tax: €100
    Tax 21%: €50 (€10.50)
    Tax 6%: €50 (€3.00)
    Order total including tax: €113.50

    Can you help me get there?


  2. Ewout
    Plugin Author

    Posted 2 years ago #

    Hi Indira,
    You can get the tax classes in an array like this: $taxes = $wpo_wcpdf->get_order_taxes()

    you can then print these in a table by getting their respective labels & value:

    foreach( $taxes as $tax ) :
    		<th><?php echo $tax['label']; ?></td>
    		<td><?php echo $tax['value']; ?></td>

    You can get the grand total including tax with: $wpo_wcpdf->order_grand_total('incl')

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce PDF Invoices & Packing Slips
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.