This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
base/components/cart-checkout/address-form
blocks/cart-checkout/checkout Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ const AddressForm = ( {
9494 countryValidationError ,
9595 setValidationErrors ,
9696 clearValidationError ,
97+ type ,
9798 ] ) ;
9899
99100 id = id || instanceId ;
Original file line number Diff line number Diff line change @@ -136,9 +136,8 @@ const Checkout = ( { attributes, scrollToTop } ) => {
136136 setShippingAsBilling,
137137 showBillingFields,
138138 } = useCheckoutAddress ( ) ;
139- const addressFields = useMemo ( ( ) => {
139+ const addressFieldsConfig = useMemo ( ( ) => {
140140 return {
141- ...defaultAddressFields ,
142141 company : {
143142 ...defaultAddressFields . company ,
144143 hidden : ! attributes . showCompanyField ,
@@ -253,8 +252,10 @@ const Checkout = ( { attributes, scrollToTop } ) => {
253252 id = "shipping"
254253 onChange = { setShippingFields }
255254 values = { shippingFields }
256- fields = { Object . keys ( addressFields ) }
257- fieldConfig = { addressFields }
255+ fields = { Object . keys (
256+ defaultAddressFields
257+ ) }
258+ fieldConfig = { addressFieldsConfig }
258259 />
259260 { attributes . showPhoneField && (
260261 < ValidatedTextInput
@@ -311,8 +312,10 @@ const Checkout = ( { attributes, scrollToTop } ) => {
311312 onChange = { setBillingFields }
312313 type = "billing"
313314 values = { billingFields }
314- fields = { Object . keys ( addressFields ) }
315- fieldConfig = { addressFields }
315+ fields = { Object . keys (
316+ defaultAddressFields
317+ ) }
318+ fieldConfig = { addressFieldsConfig }
316319 />
317320 </ FormStep >
318321 ) }
You can’t perform that action at this time.
0 commit comments