fbpx

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 9.3.2 and WordPress 6.6.2