File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
app/code/Magento/Checkout/view/frontend/web/js/model Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ define([
8484 quoteAddressToFormAddressData : function ( addrs ) {
8585 var self = this ,
8686 output = { } ,
87- streetObject ;
87+ streetObject ,
88+ customAttributesObject ;
8889
8990 $ . each ( addrs , function ( key ) {
9091 if ( addrs . hasOwnProperty ( key ) && ! $ . isFunction ( addrs [ key ] ) ) {
@@ -100,6 +101,16 @@ define([
100101 output . street = streetObject ;
101102 }
102103
104+ //jscs:disable requireCamelCaseOrUpperCaseIdentifiers
105+ if ( $ . isArray ( addrs . customAttributes ) ) {
106+ customAttributesObject = { } ;
107+ addrs . customAttributes . forEach ( function ( value ) {
108+ customAttributesObject [ value . attribute_code ] = value . value ;
109+ } ) ;
110+ output . custom_attributes = customAttributesObject ;
111+ }
112+ //jscs:enable requireCamelCaseOrUpperCaseIdentifiers
113+
103114 return output ;
104115 } ,
105116
You can’t perform that action at this time.
0 commit comments