• sueastech

    (@sueastech)


    Hi, we are based in Australia UTC/GMT +10 hours – so that if we receive an order notification email / or order confirmation with {order_date} is sent to customer, at say 9am in the morning our time, the order date is showing as the preceding day in error. Is it possible please to amend the plugin to retrieve Local date, rather than Universal date as per WordPress settings (for the {order_date} shortcode). Alternatively, is there a short code for Local date?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    Thank you for reaching out to us.

    We use WordPress time zone, please go to WordPress setting to change to your time zone.

    Best regards.

    Thread Starter sueastech

    (@sueastech)

    thank you for your reply – we already have local time setup in WordPress settings, but it still seems to be using the universal time instead of local timezone settings.

    my web guy has advised:
    In the shortcodes() function, the order date is generated using the date_i18n() function, which takes the current time using current_time(‘U’) and formats it according to the WordPress date format settings. However, the current_time(‘U’) function returns the current time in the UTC (Coordinated Universal Time) timezone, not the local Sydney time zone.

    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    In fact, if you test the order date in the preview, it is not the real order date,

    '{order_date}'            => date_i18n( $date_format, current_time( 'U' ) ),

    The real order date will be set as the date when that WooCommerce order is created.

    $shortcodes['{order_date}']           = date_i18n( $date_fm, strtotime( $object->get_date_created() ) );

    Best regards.

    Thread Starter sueastech

    (@sueastech)

    thank you again, regardless, the order shortcode is returning the universal time /date created, instead of the Local time/date. how can we return the Local time/date please – is there a shortcode specific for Local time? thank you

    Plugin Support angelagrey

    (@angelagrey)

    Thread Starter sueastech

    (@sueastech)

    thank you – do I need to save the templates I have created already – if so, how do I do this please? will they be over-written with the new version? thank you.

    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    Rest assured that all created email templates will stay remain. You needn’t save them.

    Best regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.