Support » Plugin: WooCommerce » Woocommerce 6.9 date issue

  • Resolved Oleg

    (@submedia)


    Hi. After update to 6.9 I face random wrong order dates for orders created over checkout and woocommerce admin. Order dates is -6 difference from the actual date.

    P.S. server has the correct date/time.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Oleg

    (@submedia)

    I located that the problem happens whenever updating an order through woocommerce admin. Every time you press update button the current time changes -3 hours.
    Dear WooCommerce please check this out.

    I confirm that this issue occurs and is present in wooocommerce version 6.9.

    If you make any updates to any order page, it adds 3 hours to the order creation date.

    This is a bug of this new version of woocommerce.

    Same error here. Using 3 differtent shop configurations (one is based on Flatsome theme, other is using The7 theme and another using Consulting theme).
    Checked on staging site with only WooCommerce as the active plugin and Storefront theme – the error still happens.
    Whenever I open an order to edit on /wp-admin/edit.php?post_type=shop_order page the order time is set back with 2 hours.
    This is because since version 6.9 WooCommerce uses UTC timezone (I do not know why) and our real timezone set in WordPress and in PHP is UTC+2 Europe/Budapest.
    On WooCommerce status report it says:
    Default Timezone is UTC: āœ”
    Which is wrong, as the timezone set in PHP and WordPress is Europe/Budapest (UTC+2).

    I found a quick workaround until dev guys find the issue. Copy the below code into the functions.php file of your (child)theme.
    This makes the ordering of shop orders default to post id (number of order).

    function set_order_of_shop_orders_in_admin( $wp_query ) { global $pagenow;
    if ( is_admin() && 'edit.php' == $pagenow && isset($_GET['post_type']) && !isset($_GET['orderby'])) {
    if ( $_GET['post_type'] == 'shop_order' ) {
    $wp_query->set( 'orderby', 'ID' );
    $wp_query->set( 'order', 'desc' );       
    } } }
    add_filter('pre_get_posts', 'set_order_of_shop_orders_in_admin', 5 );
    Thread Starter Oleg

    (@submedia)

    Hello @ucsendre. Unfortunately the workaround doesn’t work. It still subtracts 3 hours from the current time whenever updating an order.

    Hello @submedia
    I know it does not solve the main problem (that is why I called it workaround), but the basic problem for many of us was that the orders are no longer ordered on the admin screen because they are in ordered by time by default (which is messed up now).
    So the quick fix was to set the ordering of orders to the ID – which is not (yet) messed up šŸ˜‰

    Plugin Support Joey – a11n

    (@jricketts4)

    A fix has been submitted for this issue: https://github.com/woocommerce/woocommerce/pull/34687
    We anticipate a release coming soon that should fix this problem. Promptly update to v6.9.2 when released.

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