Having the same problem. Currently using Drupal 9.5.9 and Commerce 8.x-2.35. Able to recreate the issue on our dev server by using the back button after order completion. The order transitions from draft to complete two separate times.
- 🇮🇱Israel jsacksick
hm.. This is going to be tricky to fix/debug... I'm wondering if calling the
loadForUpdate()
method from CheckoutFlowBase::getOrder() would fix this... but I'm afraid this could cause the order to be locked when the order isn't going to be saved...It could be that
PaymentProcess::isVisible()
still returns TRUE even thought he order is paid because the
total_paid
field is not yet updated since that is done from the PaymentOrderUpdater on destruct().