From 1e171212215907d0d7691f1baa833ae29102acbb Mon Sep 17 00:00:00 2001 From: R Gianni Date: Tue, 13 Aug 2019 11:47:21 +0100 Subject: [PATCH] adds condition around state name property --- app/views/spree/shared/_paypal_checkout_button.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/spree/shared/_paypal_checkout_button.html.erb b/app/views/spree/shared/_paypal_checkout_button.html.erb index c01da05b..bdb62b1d 100644 --- a/app/views/spree/shared/_paypal_checkout_button.html.erb +++ b/app/views/spree/shared/_paypal_checkout_button.html.erb @@ -7,7 +7,9 @@ line1: '<%= address.address1 %>', line2: '<%= address.address2 %>', city: '<%= address.city %>', + <% if Spree::Config[:address_requires_state] and address.country.states_required %> state: '<%= address.state.name %>', + <% end %> postalCode: '<%= address.zipcode %>', countryCode: '<%= address.country.iso %>', phone: '<%= address.phone %>',