Display current date and time


[wcj_current_datetime] shortcode displays current date and time. For datetime_format check documentation on date and time formatting.


(optional) Date and Time format.

Default: Format as set in Settings > General > Date Format and Time Format, with space between date and time. E.g.: Y/m/d g:i a
(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


Accessible through:
  • [wcj_current_datetime]
Tested on WooCommerce 3.5.4 and WordPress 5.0.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



  1. Alex August 30, 2018 at 11:13 pm #

    Hello! I cannot add shortcode [wcj_current_datetime] to the head of xml file. How should i do this so it will be like this:

    yml_catalog date=”2011-07-20 14:58″

    Thank You in advance

    Reply to thread

    • Booster Support Team September 3, 2018 at 9:30 pm #

      Hi Alex,

      I’ve just tested and you are correct – there seems to be some problem when using shortcodes inside html tag in header – will be fixed in next Booster update (update planned at the end of this week).

      Best regards,

      Booster Support Team
    • Booster Support Team September 4, 2018 at 10:03 am #

      Hi again Alex,

      I’ve just made the required changes to the plugin. Please download the development version here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear). If you are a Booster Plus user – please let me know (on tom@booster.io) your order number, and I will send you the development version for Plus.

      Now you can use HTML entities in Products XML Feeds module’s XML header and footer, so this (i.e. replacing < with &lt; and > with &gt;) should solve the issue:

      &lt;yml_catalog date="[wcj_current_datetime datetime_format="Y-m-d H:i:s"]"&gt;

      Please let me know if there are still any issues.

      P.S. If you like Booster, please consider leaving us a rating.

      Best regards,

      Booster Support Team
    • Alex September 4, 2018 at 7:08 pm #

      Yes! Thats worked for me – now the datetime is displaying correctly
      Thank You very much

      I got one more question – in the xml file I need to show product stock status like true | false
      (<offer available=”true” id=”6203″> – if the product is in stock or <offer available=”false” id=”6203″> – if it out of stock)

      Tried to use [wcj_product_stock_availability] – but it is something different – maybe I should use custom shortcode – but do not know how

      Thank You in advance

    • RokasJ September 6, 2018 at 1:00 pm #

      Hi Alex,

      Can you try using this:
      <offer available=”[wcj_product_stock_status outofstock="false" instock="true"]” id=”[wcj_product_id]″>

      Best regards,
      Rokas – Support Team

  2. deft1z September 6, 2018 at 3:15 pm #

    thanx for the reply, RokasJ

    it did worked for woocommerce 3, but crashed the site (white screen) for woocommerce 2.6.8.
    I need that thing exactly for woocommerce 2.6.8. – maybe there is another shortcode me to help?

    Reply to thread