Display order items table


[wcj_order_items_table] shortcode displays WooCommerce order items table. Shortcode is the main part of invoice template in PDF Invoices module.


(required) List of predefined table columns you need to display. Columns identifiers must be separated by vertical bar ( | ). Possible column identifiers are:

  • item_number
  • item_name
  • item_short_description
  • item_variation
  • item_thumbnail
  • item_sku
  • item_quantity
  • item_total_tax_excl
  • item_total_tax_incl
  • item_subtotal_tax_excl
  • item_subtotal_tax_incl
  • item_tax
  • item_weight
  • item_product_input_fields
  • item_key
  • line_total_tax_excl
  • line_total_tax_incl
  • line_subtotal_tax_excl
  • line_subtotal_tax_incl
  • line_tax
  • line_subtax
  • line_tax_percent
  • debug
Default: None
(optional) List of vertical bar ( | ) separated column titles.

Default: None
(optional) List of vertical bar ( | ) separated column styles.

Default: None
(optional) If set to yes will hide currency symbol from result.

Default: no
(optional) HTML class for the resulting table.

Default: None
(optional) If not empty, shipping will be added to order items list as line item. It is possible to add shipping method name to the item’s name, by adding %shipping_method_name% to the attribute value.

Default: None
(optional) If not empty, discount will be added to order items list as line item.

Default: None
(optional) The integer ID for an order.

Default: The current order ID, if exists
(optional) Format for outputting percent data in table.

Default: %.2f %%
(optional) Attribute used only if item_thumbnail column is enabled.

Default: None
(optional) Attribute used only if item_thumbnail column is enabled.

Default: None
(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

This will create invoice with 3 columns: item counter, item name and price, setting column titles and styles accordingly:

[wcj_order_items_table table_class="pdf_invoice_items_table"
Recommended for PDF Invoicing and Packing Slips module
Accessible through:
  • [wcj_order_items_table]
Tested on WooCommerce 3.0.4 and WordPress 4.7.4
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. Rune February 18, 2015 at 10:10 pm #


    I posted an support ticket a few days ago but i think it has dissapeared. I can not get this shortcode to work for V2 invoice.
    I have it set like this: columns=”item_number|item_name|item_quantity|wcj_product_price|line_total_tax_excl”

    Also i was asking for a line total shortcode incl. tax. I have to use V2 invoice where i have different number for order, invoice and packinglist.
    In V1 the invoice number is the same as the order number, and the subtotal is only excl. tax.

    I need each product line to include name, quantity, price(incl. tax), line_total(incl.tax)
    Then the sum fields like this:
    Subtotal: same as line_total(incl.tax)
    Discount: (incl. tax)
    Shipping: (incl.tax)
    Wherof 25%tax: The tax amount
    Sumtotal: total sum incl. tax

    But i can not figure out how to setup this using V2 invoice.



    • WooJetpack Support Team February 19, 2015 at 2:54 pm #

      Hi Rune,

      Sorry for the delayed reply.

      Regarding [wcj_order_items_table] shortcode columns – I’ve started documentation page – http://booster.io/shortcodes/wcj_order_items_table/ – please check it.
      Regarding numbering in PDF Invoice V2 – you can set invoice numbers same as order id – uncheck sequential numbering and use Renumerate Invoices tool.
      I’m going to add documentation for PDF Invoices V2 in an couple of days, hope it will be more clear.

      Best regards,

    • Rune February 19, 2015 at 4:03 pm #

      Thank you Tom, that made things more clear.

      Yes i will use V2 because it has separate numbering for invoice, order and packlist, so this is great.

      My main problem is that in Norway if a new company is still not registered with the tax system they are not allowed to specify tax in the invoice, this means that all prices needs to be included tax. I can not find shortcode for the subtotal in pdf_invoice_totals_table which inclue tax.

      Thanks again.


  2. Rune February 20, 2015 at 10:39 am #

    Back again with an image of what i am trying to setup. Checked your shortcode files and did some tests and actually easy to make this work. I can buil a custom function to handle this for my own use but i really think many should be interested to have it build into plugin.


    The product line with product price BEFORE discount, then the given discount and then linetotal after discount (all incl. tax). Separate fields which displays tax.

    Then in the total table we need subtotal incl tax, shipping incl. tax and sum total incl. tax.

    I hope this explains my needs and that it is in your interest to add to code.



    • Rune February 20, 2015 at 10:29 pm #

      Ok, i have solved most of my problems by using the “discount_as_item=”Discount”

      Then i have the product line with all amounts including TAX
      And the discount line looks ok.

      2 problems still and that is the Subtotal does not summer all product lines, the discount line/amount is not included so when i add a Discount -$100 in table total it all looks wrong. And Shipping price is only available excl. TAX (should also be incl. tax)

      With these 2 in place i can use a bottomline like “Whereof 25% tax: $111.00”

      By now i have made 2 new shortcodes in class-wcj-orders-shortcodes.php so it works for me until next update 😉
      So I hope these 2 (or similar) shortcodes can be implemented,

      wcj_order_subtotal_incl_discount and wcj_order_shipping_price_incl_tax


    • WooJetpack Support Team February 25, 2015 at 10:09 am #

      Hi Rune,

      Sorry for the delayed reply.
      1. [wcj_order_subtotal_after_discount] added.
      2. Regarding your second request about wcj_order_shipping_price_incl_tax – the [wcj_order_shipping_price] shortcode should return shipping incl. TAX, while [wcj_order_shipping_price excl_tax="yes"] will display the shipping excluding the TAX. I’ve tested on our test server – it seems to work as expected. Please let me know if I missed something.

      Best regards,

  3. vieradel September 14, 2015 at 1:34 pm #

    Hello, I have found the following. Is there any solution?

    “Extra WooCommerce Product Options” Fields



    • Valentin Solovjov September 14, 2015 at 4:51 pm #

      Dear Vieradel,

      what “Extra WooCommerce Product Options” Fields do you need?


  4. Moritz Walter March 11, 2016 at 1:27 pm #

    Hi! Just processed a partial refund, is there a way to display the refunded amount as a position in this table somehow? All the best, Moritz


  5. Daniele April 13, 2016 at 9:51 am #

    How can I print unit price (with or without tax) in wcj_order_items_table?


    • Valentin Solovjov April 20, 2016 at 8:37 pm #


      try these attributes for shortcode [wcj_order_items_table]



  6. Tim May 24, 2016 at 4:41 am #

    Is there a way to display the weight of each item such as “item_weight”?


    • Booster Support Team May 24, 2016 at 9:28 am #

      Hi Tim,

      Wasn’t possible, but I’ve just added it to the plugin. Please download the development version here – http://booster.io/dev/. You will need to uninstall the old version first (don’t worry your saved settings won’t disappear). As you suggested, new column is named item_weight. Please let me know if it works as expected.

      Best regards,

      Booster Support Team
    • Tim May 24, 2016 at 9:39 am #

      Awesome. Thanks guys!

    • Booster Support Team May 24, 2016 at 10:19 am #

      No problem 🙂
      Please let me know if you need anything else added.

      Best regards,

      Booster Support Team
  7. Marcel November 6, 2016 at 10:58 am #

    How can I include just the item name in a template, without the table structure?


    • Booster Support Team November 6, 2016 at 10:59 pm #

      Hi Marcel,

      Don’t think it’s possible at the moment, but I could add it to the plugin. However I would need more details – do you want to list all order items as some list (e.g. each item name on separate line), is that correct?

      Best regards,

      Booster Support Team
  8. franck November 25, 2016 at 10:58 pm #

    I use the “item_product_input_fields” in my billing template inside the shortcode “[wcj_order_items_table].
    The table is ok and all the columns i need are in place. But the areas for “item_product_input_fields” are empty.
    What do i do wrong ?
    Best regards.


    • franck November 25, 2016 at 11:44 pm #

      Sorry everything works well.
      I just had to upgrade booster to 2.5.6 and that’s it !!
      Very great plug-in.

    • Booster Support Team November 26, 2016 at 5:58 pm #

      Hi Franck,

      Thank you 🙂

      Best regards,

      Booster Support Team
  9. maryann December 17, 2016 at 5:26 am #


    I cant seem to get discount per product in PDF invoice.
    This is what I’ve done –
    columns_titles=”|Product|Qty|Total|Coupon Discount”
    What am i doing wrong?


    • Booster Support Team December 19, 2016 at 8:27 pm #

      Hi Maryann,

      Sorry for a delay. discount_as_item attribute should be used like that:

      It will display order discount as line in order items table.

      Please let me know if you have any questions.

      Best regards,

      Booster Support Team
    • maryann December 28, 2016 at 8:47 am #


      Is there any way i can show discount per product in PDF invoice?


  10. Ugenijus February 15, 2017 at 8:41 am #


    This code worked for a long time, but now stops, because of item_thumbnail. If i remove this from code, everything is ok.

    [wcj_order_items_table table_class=”pdf_invoice_items_table”

    Whats wrong, please?

    I use Booster Plus.

    Thank You


    • Ugenijus February 21, 2017 at 11:01 am #

      WordPress 4.7.2.
      Woocommerce 2.6.14
      Booster for WooCommerce 2.5.9
      Booster Plus for WooCommerce 1.1.0

      When I use this code on PACKING SLIPS HTML Template, PDF file can’t be downloaded or previewed.
      [wcj_order_items_table table_class="pdf_invoice_items_table"

      If I remove – item_thumbnail – everything works ok, PDF file is downloadable. This code works ok:
      [wcj_order_items_table table_class="pdf_invoice_items_table"

  11. Rory Restani March 23, 2017 at 5:55 pm #

    how do I hide products from the pdf invoice?

    I have several woo commerce items which are hidden from the store and bundled together as a kit. On my checkout and new order emails from woo commerce the items stay hidden but they appear as a long list on the pdf.

    I want hidden products to stay hidden on the pdf invoice.