don't override existing addresses on order with AddressFinder

This commit is contained in:
Andy Brett
2021-08-25 13:11:48 -07:00
parent b5024c5a16
commit 759c5d6bdd

View File

@@ -35,8 +35,8 @@ module CheckoutCallbacks
def load_saved_addresses
finder = OpenFoodNetwork::AddressFinder.new(@order.email, @order.customer, spree_current_user)
@order.bill_address = finder.bill_address
@order.ship_address = finder.ship_address
@order.bill_address ||= finder.bill_address
@order.ship_address ||= finder.ship_address
end
def load_shipping_methods