[wcj_order_total_tax]

Display WooCommerce order total tax

Description

[wcj_order_total_tax] shortcode displays WooCommerce order total tax.

Args

order_id
(optional) The integer ID for an order.

Default: The current order ID, if exists
hide_if_zero
(optional) If set to yes will return empty string instead of numeric zero “0”. Can be used in conjunction with before and after args, so in case the result is zero, the whole content will be hidden.

Default: no
before
(optional) Text to place before the content. If content is empty this argument is ignored.

Default: None
after
(optional) Text to place after the content. If content is empty this argument is ignored.

Default: None

Example

Shortcode is intended (but not limited) to use with PDF Invoicing and Packing Slips module.

<table class="pdf_invoice_totals_table">
<tbody>
	<tr><th>Subtotal</th><td>[wcj_order_subtotal]</td></tr>
	[wcj_order_total_discount hide_if_zero="yes" before="<tr><th>Discount</th><td>" after="</td></tr>"]
	<tr><th>Taxes</th><td>[wcj_order_total_tax hide_if_zero="no"]</td></tr>
	<tr><th>Order Total</th><td>[wcj_order_total]</td></tr>
</tbody>
</table>
Accessible through:
  • [wcj_order_total_tax]
Tested on WooCommerce 2.6.14 and WordPress 4.7.3
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

1 Comment

  1. Aleksey June 23, 2016 at 12:45 am #

    Hello,
    Is there any way to split the individual taxes in the invoice? We have 2 taxes applied to each order (BC, Canada) and I’d like two of them listed on an invoice. Taxes are added via WooCommerce core.
    Thanks,
    Aleksey

    Reply