Extracting the advanceOrder function into a function in the Spree namespace so that both the shipmentsJS and line_itemsJS can share it
Advancing the order after we add variants on the cart page. If we have already created shipments, then when we edit a line item the order gets reset to the address state. This call pushes it back to the payment state and destroys the old shipments, recreating them to match the new line item state.