Only pass billing address details if they are present.
This commit is contained in:
parent
6b82df21af
commit
63ff2c99bf
|
@ -390,6 +390,7 @@ module Spree
|
|||
|
||||
# suggest current user's email or any email stored in the order
|
||||
opts[:email] = spree_current_user ? spree_current_user.email : order.email
|
||||
if order.bill_address.present?
|
||||
opts[:address_override] = 1
|
||||
opts[:address] = {
|
||||
:name => order.bill_address.full_name,
|
||||
|
@ -401,7 +402,7 @@ module Spree
|
|||
:state => order.bill_address.state_text,
|
||||
:country => order.bill_address.country.iso
|
||||
}
|
||||
|
||||
end
|
||||
opts
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue