[wcj_order_date]

Display order date

Description

[wcj_order_date] shortcode displays date for WooCommerce order.

Args

order_id
(optional) The integer ID for an order.

Default: The current order ID, if exists
date_format
(optional) Date format as used in PHP date function.

Default: Date format as set in current site’s WordPress settings
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
visibility
(optional) Make shortcode results visible to everyone (all), or to admin only (admin).

Default: all

Usage Example

Shortcode is intended (but not limited) to use with PDF Invoicing and Packing Slips module. Example demonstrates how could invoice header look like:

Invoice Number: [wcj_invoice_number]
Invoice Date: [wcj_invoice_date]
Order Number: [wcj_order_number]
Order Date: [wcj_order_date]
Accessible through:
  • [wcj_order_date]
Tested on WooCommerce 3.2.5 and WordPress 4.9
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

2 Comments

  1. Simon May 11, 2016 at 3:29 am #

    how can I escape the dashes using [wcj_order_date]? I want to make it look like YmD instead of Y-m-D

    Reply to thread

    • Booster Support Team May 11, 2016 at 11:04 am #

      Hi Simon,

      To change date format, you need to add date_format attribute. E.g.:
      [wcj_order_date date_format="YmD"]

      Best regards,
      Tom

      Booster Support Team