Wrong date on orders page
-
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>
- The topic ‘Wrong date on orders page’ is closed to new replies.