Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orders tab on contact records show incorrect time #36

Open
mjwright opened this issue Jan 20, 2021 · 0 comments
Open

Orders tab on contact records show incorrect time #36

mjwright opened this issue Jan 20, 2021 · 0 comments

Comments

@mjwright
Copy link

Has anyone else noticed that the time shown for orders on the Woocommerce Orders tab is shown as UTC time and not local time? I was able to fix this by replacing the following line in get_orders(), class-woocommerce-civicrm-orders-contact-tab.php

Replace:
$orders[$customer_order->ID]['order_date'] = date_i18n($date_format , strtotime($order->get_date_created()));

With:
$orders[$customer_order->ID]['order_date'] = $order->get_date_created()->date_i18n($date_format);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant