• Resolved hebhansen

    (@hebhansen)


    Hey Woo

    I am setting up emails for woo. Is it possible to make a placeholder that puls the present year at any given time?

    {site_title}, {order_date}, {order_number}, {customer_first_name}, {customer_last_name}, {customer_full_name}, {customer_username}, {customer_email}

    Here are the ones I know I have…

    The idea is to make a self correcting copyright footline such as:

    Brand © 2004-{current_year} All Rights Reserved.

    Thx H

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @hebhansen

    Thanks for reaching out!

    I understand that you want to customize your email templates to add the current year at the footer of every email, is that correct?

    I did some research and found these articles could be a good starting point:

    How to Customize WooCommerce Emails
    How to Customize Order Emails in WooCommerce

    Hope this helps!

    Thread Starter hebhansen

    (@hebhansen)

    Thx Xue

    My custom mails are setup and working. In copyright footer I just want it to update current year by itself, so I don’t need to remember. A placeholder such as

    {current_year}

    . Output should be 2022 at present and on january 1st 0:05 am it should be 2023. My questions is, does this placeholder exist or can I create it?

    For artwork you have a fixed date of production. For fx a website you have a copyright time span. © 2018 – 2022 fx. Hence, © 2018 – {current_year} should deliver the trick and at all times Copyright statement.

    Thx

    Howdy @hebhansen 👋

    I am setting up emails for woo. Is it possible to make a placeholder that puls the present year at any given time?

    If you’re a developer or are comfortable editing PHP files, WooCommerce provides everything you need to make changes to transactional email templates.

    The actual code for fetching the current year, in PHP, is the following:
    <?php echo date('Y'); ?>

    For further information on this, kindly refer to the Creating custom templates with code section of the How to Customize WooCommerce Emails article, my colleague shared.

    I trust that points you in the right direction, but if you have more questions, let us know. We’re happy to help.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Placeholder – current_year’ is closed to new replies.