Order Date/Time in admin is wrong since update
-
woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php
Around line 241 you are outputting the date, hour, and the minute inputs for the order meta data on the edit order screen.
The previous version of the plugin was outputting it correctly with:
esc_attr( date_i18n( ‘H’, strtotime( $post->post_date ) ) )The newest version is outputting the UTC time, even with a local timezone set via:
esc_attr( date_i18n( ‘H’, strtotime( $order->get_date_created() ) ) )This is messing up ALL orders in the admin by showing incorrect date/times and potentially making them get saved incorrectly if they update the order after creation. Needs a fix ASAP
-
Same problem happened on my site, hope it gets fixed soon.
Hi @nkals722
I understand that on your site, after the latest WooCommerce update, it is showing UTC time, even with a local timezone set.
Can you tell us if the same happens when you deactivate all other plugins (except WooCommerce) and change the theme to the default Storefront temporarily? You can test this out on a staging site using a plugin like WP Staging, without affecting the main site.
If the problem disappears at this point, that would indicate that a plugin/theme is interfering. Here’s the conflict test guide for reference: https://docs.woocommerce.com/document/how-to-test-for-conflicts/
Let us know what you find.
Hello
Please Fix the Bug ORDER CREATE TIME on version 6.9.0 – 6.9.1To update order on processing to completet, create time is changed.
If I change 10 times the Order: completed + Update, Hold + Update…… – The Order Create time changes 10 times.
Thank you.
This is a big issue in this update.
1. Orders are in UTC time
2. Each order modification adds 3 hours to the order date.This, as the updates/modifications made to the order add several hours to the order, moving to the next day, causing a mismatch with ERP synchronization.
We momentarily revert to the previous version to avoid the problem with customer orders and their shipping.
This needs to be fixed urgently.
I have tested on our staging site with WooCommerce as the only active plugin and Storefront theme.
The error is still there.
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 is set to UTC and our real timezone set in WordPress and in PHP is UTC+2 Europe/Budapest.
Please release a fix ASAP as this error is totally ridiculous.### WordPress Environment ### WordPress address (URL): https://xxx.domain.tld Site address (URL): https://xxx.domain.tld WC Version: 6.9.1 REST API Version: ? 6.9.1 WC Blocks Version: ? 8.3.2 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0.2 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ? WP Cron: ? Language: hu_HU External object cache: – ### Server Environment ### Server Info: nginx/1.20.2 PHP Version: 8.1.10 PHP Post Max Size: 50 MB PHP Time Limit: 300 PHP Max Input Vars: 3000 cURL Version: 7.29.0 NSS/3.53.1 SUHOSIN Installed: – MySQL Version: 10.5.17-MariaDB Max Upload Size: 50 MB Default Timezone is UTC: ? <------------ this is _WRONG_!!!_ the default timezone set in PHP and WordPress is 'Europe/Budapest' (UTC+2) -------------------!!!!! fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? wp_remote_get() failed. Contact your hosting provider. 503 ### Database ### WC Database Version: 6.9.1 WC Database Prefix: XYZs4JJw_ Total Database Size: 504.85MB Database Data Size: 329.20MB Database Index Size: 175.65MB ### Post Type Counts ### attachment: 2697 blocks: 33 custom_css: 1 flamingo_contact: 755 flamingo_inbound: 75 nav_menu_item: 54 oembed_cache: 2 page: 73 post: 11 product: 122 product_variation: 116 revision: 12 saswp: 2 shop_coupon: 9 shop_order: 22932 shop_order_refund: 10 user_request: 4 ux_template: 15 wcp_ruleset: 1 wp_block: 1 wp_global_styles: 1 wpcf7_contact_form: 8 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (1) ### WooCommerce: by Automattic – 6.9.1 ### Inactive Plugins (37) ### Akismet Anti-Spam: by Automattic – 5.0 Asset CleanUp: Page Speed Booster: by Gabe Livan – 1.3.8.5 Conditional Fields for Contact Form 7: by Jules Colle – 2.2.6 Conditional Payments for WooCommerce: by Lauri Karisola / WP Trio – 2.3.1 Contact Form 7: by Takayuki Miyoshi – 5.6.3 Disable Bloat for WordPress & WooCommerce: by Disable Bloat – 3.0.3 Disable REST API: by Dave McHale – 1.7 Envato Market: by Envato – 2.0.7 Flamingo: by Takayuki Miyoshi – 2.3 Flying Analytics by FlyingPress: by FlyingPress – 2.0.3 Hungarian Pickup Points & Shipping labels for WooCommerce: by Viszt Péter – 1.9.0.5 Integration for Szamlazz.hu & WooCommerce: by Viszt Péter – 5.6.3.4 Loco Translate: by Tim Whitlock – 2.6.2 Nextend Social Login: by Nextendweb – 3.1.6 OTP online áruhitel b?vítmény: by Fullcode – v1.2.6.4 OTP SimplePay Gateway for WooCommerce: by Cone Development – 2.5.3 Pay in Store WooCommerce Payment Gateway: by Papaki – 1.2.6 Print Invoice & Delivery Notes for WooCommerce: by Tyche Softwares – 4.6.5 Product Visibility by User Role for WooCommerce: by WP Wham – 1.8.0 Product XML Feeds for WooCommerce Pro: by WPWhale – 2.5.4 Rank Math SEO: by Rank Math – 1.0.97 Safe SVG: by 10up – 2.0.3 SOFT79 Cart Links for WooCommerce: by Soft79 – 1.1.4 Ultimate Maps by Supsystic: by supsystic.com – 1.2.10 URL Coupons for WooCommerce: by WPFactory – 1.6.6 User Role Editor: by Vladimir Garagulya – 4.63 Waitlist woocommerce( Back in stock notifier ): by – 2.5.2 WebP Express: by Bj?rn Rosell – 0.25.5 WooCommerce Dynamic Pricing & Discounts: by RightPress – 2.4.5 WooCommerce Product Bundles: by WooCommerce – 6.17.0 WooCommerce Table Rate Shipping: by Bolder Elements – 4.3.5 WooCommerce UPC, EAN, and ISBN: by Scott Bolinger – 0.5.1 Woocommerce árukeres? - Megbízható bolt integráció: by Dávid Richárd – 1.1.0 WP-Sweep: by Lester 'GaMerZ' Chan – 1.1.5 WPFactory Helper: by Algoritmika Ltd – 1.3.2 WP Fastest Cache: by Emre Vona – 1.0.5 WP Mail SMTP: by WPForms – 3.5.2 ### Dropin Plugins (1) ### maintenance.php: maintenance.php ### Settings ### API Enabled: – Force SSL: – Currency: HUF (Ft) Currency Position: right_space Thousand Separator: Decimal Separator: , Number of Decimals: 0 Taxonomies: Product Types: bundle (bundle) external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ? Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #396 - /shop/ Cart: #1122 - /shop/kosar/ Checkout: #1121 - /shop/szallitas-es-fizetes/ My account: #1120 - /shop/fiokom/ Terms and conditions: #403 - /shop/aszf/ ### Theme ### Name: Storefront Version: 4.1.3 Author URL: https://woocommerce.com/ Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: – ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings Daily Cron: ? Next scheduled: 2022-09-15 09:21:03 +02:00 Options: ? Notes: 9 Onboarding: completed ### Action Scheduler ### Complete: 208 Oldest: 2022-08-17 09:01:54 +0200 Newest: 2022-09-15 09:22:33 +0200 Pending: 10 Oldest: 2022-09-15 17:29:27 +0200 Newest: 2022-09-19 17:46:38 +0200 ### Status report information ### Generated at: 2022-09-15 09:25:09 +02:00
Same issue for my site – have disabled all plugins, used storefront and issue persists.
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 );
FYI, this is addressed and fixed in github with a new version coming out shortly apparently:
https://github.com/woocommerce/woocommerce/issues/34686
Hopefully as soon as possible since this can really mess up orders if you edit them manually…
Hello
The Bug – order created date is Fixed on version 6.9.2Thank you.
Hi there,
The Bug – order created date is Fixed on version 6.9.2
Thanks for confirming ??.
Kind regards,
- The topic ‘Order Date/Time in admin is wrong since update’ is closed to new replies.