Skip to content
Snippets Groups Projects
Commit fe198523 authored by Sascha Grossenbacher's avatar Sascha Grossenbacher Committed by Ryan Szrama
Browse files

Issue #1968712 by Berdir: reset the order object stored in the checkout form...

Issue #1968712 by Berdir: reset the order object stored in the checkout form form cache so a submission that fails validation will ensure the form gets rebuilt with the updated order object.
parent a0a6fca5
No related branches found
No related tags found
No related merge requests found
......@@ -297,8 +297,10 @@ function commerce_checkout_form_validate($form, &$form_state) {
$form_state['storage']['errors'] = $form_errors;
$form_errors = array();
// Save the updated order object.
// Save the updated order object and reset the order in the form cache to
// ensure rebuilt forms use the updated order.
commerce_order_save($order);
$form_state['build_info']['args'][0] = $order;
// If a pane failed validation or the form state has otherwise been altered to
// initiate a rebuild, return without moving to the next checkout page.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment