• Resolved thehajam

    (@thehajam)


    Hi, In Order List Page, Order Date Shows Today date not order date, how can fix it?

    <td class="dokan-order-date" data-title="<?php esc_attr_e( 'Order Date', 'dokan-lite' ); ?>" >
                                <?php
                                if ( '0000-00-00 00:00:00' == dokan_get_date_created( $order ) ) {
                                    $t_time = $h_time = __( 'Unpublished', 'dokan-lite' );
                                } else {
                                    $t_time    = get_the_time( 'Y/m/d g:i:s A', dokan_get_prop( $order, 'id' ) );
                                    $gmt_time  = strtotime( dokan_get_date_created( $order ) . ' UTC' );
                                    $time_diff = current_time( 'timestamp', 1 ) - $gmt_time;
    
                                    if ( $time_diff > 0 && $time_diff < 24 * 60 * 60 ) {
                                        $h_time = sprintf( __( '%s ago', 'dokan-lite' ), human_time_diff( $gmt_time, current_time( 'timestamp', 1 ) ) );
                                    } else {
                                        $h_time = get_the_time( 'Y/m/d', dokan_get_prop( $order, 'id' ) );
                                    }
                                }
    
                                echo '<abbr title="' . esc_attr( dokan_date_time_format( $t_time ) ) . '">' . esc_html( apply_filters( 'post_date_column_time', dokan_date_time_format( $h_time, true ) , dokan_get_prop( $order, 'id' ) ) ) . '</abbr>';
                                ?>
                            </td>
Viewing 1 replies (of 1 total)
  • Hello @thehajam ,

    I have just checked in a fresh Dokan installation and the order dates are working properly in the dashboard > orders section.

    Do you have correct order dates in your WooCommerce > Orders section?

    I will recommend checking while having only WooCommerce & Dokan installed. Also, temporarily change your active theme to a default one i.e. Twenty-Twenty.

    Let me know how it goes.

    Thank you ??

Viewing 1 replies (of 1 total)
  • The topic ‘Order Date Problem In Order List’ is closed to new replies.