Display WooCommerce order subtotal


[wcj_order_subtotal] shortcode displays subtotal for WooCommerce order, that is order total before discount and excluding TAX.


(optional) The integer ID for an order.

Default: The current order ID, if exists
(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
(optional) Text to place before the content. If content is empty this argument is ignored.

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

Default: None
(optional) Make shortcode results visible to everyone (all), or to admin only (admin).

Default: all

Usage Example

Display WooCommerce order total excluding taxes, taxes and total including taxes. Please note how total discount line is hidden if equals zero:

Subtotal: [wcj_order_subtotal]
[wcj_order_total_discount hide_if_zero="yes" before="Discount: "]
TAX: [wcj_order_total_tax]
Total: [wcj_order_total]
Accessible through:
  • [wcj_order_subtotal]
Tested on WooCommerce 3.8.1 and WordPress 5.3.2
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



  1. AK December 21, 2018 at 4:13 pm #

    Is there a way to display the order subtotal after discounts? With the existing shortcodes, The item totals on invoices don’t add up if the customer used a discount coupon.

    Reply to thread

    • RokasJ December 30, 2018 at 12:48 pm #


      Unfortunately that is not possible yet but we have added it to our todo list.

      Best regards,
      Rokas – Support Team

  2. Scott February 7, 2017 at 8:28 am #

    How can this feature be used? Is it a matter of applying the shortcode?

    Reply to thread