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

Cancel unpaid orders #43442

Closed
5 tasks done
tothang opened this issue Jan 10, 2024 · 1 comment
Closed
5 tasks done

Cancel unpaid orders #43442

tothang opened this issue Jan 10, 2024 · 1 comment

Comments

@tothang
Copy link

tothang commented Jan 10, 2024

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

According to what I have learned, the function below $unpaid_orders = $data_store->get_unpaid_orders( strtotime( '-' . absint( $held_duration ) . ' MINUTES', current_time( 'timestamp' ) ) ); is in the file
wp-content/plugins/woocommerce/includes/wc-order-functions.php
This code is to handle the cancellation of orders in pending status and beyond the waiting time. This logic is related to datetime and querying the database. As far as I can see the database datetime is stored in UTC (GMT +0) But the above function is handling getting the current unix time according to the server's time zone. This is causing an error on my system because my current posting server is located in AU. Is there any way that can help me solve this problem?

Expected behavior

current_time( 'timestamp' ) should be replaced by current_time( 'timestamp' , true)

Actual behavior

current_time( 'timestamp' ) this get unix time of server

Steps to reproduce

1 create an ofer via after pay or paypal
2 leave payment window

WordPress Environment

6.1.4

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
@Konamiman
Copy link
Contributor

Hi, I'm closing this because the issue is fixed by #43641, which will be included in WooCommerce 8.6. Please follow the WooCommerce developer blog for release announcements.

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

No branches or pull requests

3 participants