• Resolved tazir

    (@tazir)


    When customer watch his own orders list (using the template file “my-order.php”) – the date went wrong (our website use local date/time):
    <time datetime="1970-01-01" title="">9 ????? 2021</time>
    I fixed by replace the original function “dokan_get_date_created” with “$order->get_date_created()”
    So, I changed line no. 49 on the above template file with:
    <time datetime="<?php echo esc_attr( date('Y-m-d', strtotime($order->get_date_created()) ) ); ?>" title="<?php echo esc_attr( strtotime($order->get_date_created()) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime($order->get_date_created()) ) ); ?></time>

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

    I have checked the Order Listings on a couple of staging websites from a Customer’s End but the Date format looks alright as shown in this screenshot.

    Do you mind sharing a screenshot of how it is appearing on your end?

    Thank you.

    Thread Starter tazir

    (@tazir)

    Here is the screenshot.
    The page used the function: echo do_shortcode("[dokan-my-orders]");

    • This reply was modified 3 years, 5 months ago by tazir.

    Hi @tazir

    We have checked but unable to find any issue from our end.
    Can you please check if you are using the latest version of the WooCommerce plugin?

    You can also find the relevant function that is being used to get the Order Creation Date in the below file path,

    File Path: wp-content > plugins > dokan-lite > includes > functions-compatibility.php
    Line No: #76

    If the issue still persists, you can contact us through our Support Channel.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wrong date on orders page’ is closed to new replies.