fbpx

Description

[wcj_order_total_tax] shortcode displays WooCommerce order total tax percent.

Args

order_id
(optional) The integer ID for an order.
Default: The current order ID, if exists
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

Usage 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>Shipping</th><td>[wcj_order_shipping_price]</td></tr>
                        <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_percent]</td></tr>
                        <tr><th>Taxes</th><td>[wcj_order_total_tax]</td></tr>
                        <tr><th>Order Total</th><td>[wcj_order_total]</td></tr>
                    </tbody>
                    </table>
Accessible through:
  • [wcj_order_total_tax_percent]
Tested on WooCommerce 8.5.1 and WordPress 6.4.2