[wcj_invoice_date]

Display WooCommerce order invoice date

Description

[wcj_invoice_date] shortcode displays WooCommerce order invoice date.

Args

invoice_type
(optional) Can be one of these values: invoice, proforma_invoice, credit_note or packing_slip.

Default: invoice
date_format
(optional) Date format as used in PHP date function.

Default: Date format as set in current site’s WordPress settings
days
(optional) Extra days to add to invoice date. Can be positive or negative. This can be used for displaying Invoice Due Date.

Default: 0
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

Example

Invoice Date: [wcj_invoice_date]
					Invoice Due Date: [wcj_invoice_date days="7"]
					[wcj_invoice_date invoice_type="proforma_invoice" before="Proforma Invoice Date: "]

This will display invoice date, invoice due date (one week later than original invoice date) and proforma invoice date. Please note how the whole line with proforma invoice date will be displayed only if proforma invoice exists.

Related

Recommended for PDF Invoicing and Packing Slips module
Accessible through:
  • [wcj_invoice_date]
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

3 Comments

  1. CKM April 30, 2015 at 5:20 pm #

    i used this code in my PDF INVOICES (V2) – numbering – Suffix section.
    but the date keep showing 1 January 1970. How to fix it?

    Looking forward for your reply.

    Thanks

    Best Regards
    Ming

    Reply

    • WooJetpack Support Team July 9, 2015 at 5:37 pm #

      Hi,

      So sorry for such a delayed reply. I’ve fixed bug with the [wcj_invoice_date] shortcode in our development version. Please check it out.

      Best regards,
      Tom

  2. Frank November 27, 2015 at 5:05 am #

    I have the same problem today.
    Any suggestion?

    Thx
    Frank

    Reply