Revert "Store API: Do not resume orders with `pending` status (#50531)" (#51067)

* Revert "Store API: Do not resume orders with `pending` status (#50531)"

This reverts commit 3170acd1b0.

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Seghir Nadir 2024-08-30 18:24:53 +01:00 committed by GitHub
parent 2890e16c86
commit dec89a1311
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Comment: This reverts an existing PR.

View File

@ -60,9 +60,8 @@ trait DraftOrderTrait {
return true;
}
// Failed orders and those needing payment can be retried if the cart hasn't changed.
// Pending orders are excluded from this check since they may be awaiting an update from the payment processor.
if ( $order_object->needs_payment() && ! $order_object->has_status( 'pending' ) && $order_object->has_cart_hash( wc()->cart->get_cart_hash() ) ) {
// Pending and failed orders can be retried if the cart hasn't changed.
if ( $order_object->needs_payment() && $order_object->has_cart_hash( wc()->cart->get_cart_hash() ) ) {
return true;
}