woocommerce/plugins
Néstor Soriano eafc87b453
Save the session data before proceeding with order payment (#40964)
* Save the session early before proceeding with order payment.

As part of the checkout process an order is created and the order id
is stored in a session variable right before requesting payment
processing to the appropriate payment gateway. Thus if the payment
fails and the user submits the order again, the order id will be
picked from the session so the existing order can be retrieved and
updated.

However if the payment process hangs (instead of returning an error)
and the request never finishes the session data will never actually
be sorted, and the next time the user submits the order a duplicate
of the first order will be created.

This commit simply does WC()->session->save_data() after the
WC()->session->set that stores the order id, so that the session is
effectively updated even if the request hangs.

* Add changelog file
2023-10-24 16:38:39 +02:00
..
woo-ai Only initializing background removal with jetpack connection present (#40918) 2023-10-23 07:56:49 -07:00
woocommerce Save the session data before proceeding with order payment (#40964) 2023-10-24 16:38:39 +02:00
woocommerce-admin Add a loading state for the new product form (#40939) 2023-10-23 12:47:26 -04:00
woocommerce-beta-tester Add wca test tool to reset Customize Your Store task (#40728) 2023-10-12 09:05:58 -05:00
woocommerce-docs Separate PHP and JS Unit Tests (#40639) 2023-10-06 15:41:47 -07:00