auto-patch 638-dev-dev01-2024-05-14T20_44_36

This commit is contained in:
root
2024-05-14 20:44:36 +00:00
parent a941559057
commit 5dbb0b284e
1812 changed files with 29671 additions and 14588 deletions

View File

@@ -1050,11 +1050,11 @@ class WC_Checkout {
return;
}
// Store Order ID in session so it can be re-used after payment failure.
// Store Order ID in session, so it can be re-used after payment failure.
WC()->session->set( 'order_awaiting_payment', $order_id );
// We save the session early because if the payment gateway hangs
// the request will never finish, thus the session data will neved be saved,
// the request will never finish, thus the session data will never be saved,
// and this can lead to duplicate orders if the user submits the order again.
WC()->session->save_data();
@@ -1073,6 +1073,7 @@ class WC_Checkout {
exit;
}
// Using wp_send_json will gracefully handle any problem encoding data.
wp_send_json( $result );
}
}
@@ -1287,6 +1288,7 @@ class WC_Checkout {
* since it could be empty see:
* https://github.com/woocommerce/woocommerce/issues/24631
*/
if ( apply_filters( 'woocommerce_cart_needs_payment', $order->needs_payment(), WC()->cart ) ) {
$this->process_order_payment( $order_id, $posted_data['payment_method'] );
} else {