Skip to content

Commit

Permalink
CET-537/chore: Billing address should take precence over saved custom…
Browse files Browse the repository at this point in the history
…erData
  • Loading branch information
brtkwr committed Dec 5, 2024
1 parent 38ef2ca commit dd3d128
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions view/frontend/web/js/view/payment/method-renderer/two_payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ define([
},
fillCustomerData: function () {
const self = this;
quote.shippingAddress.subscribe((address) => self.updateShippingAddress(address));
this.updateShippingAddress(quote.shippingAddress());

quote.billingAddress.subscribe((address) => self.updateBillingAddress(address));
this.updateBillingAddress(quote.billingAddress());

customerData
.get('companyData')
Expand All @@ -198,6 +193,12 @@ define([
.get('countryCode')
.subscribe((countryCode) => self.fillCountryCode(countryCode));
this.fillCountryCode(customerData.get('countryCode')());

quote.shippingAddress.subscribe((address) => self.updateShippingAddress(address));
this.updateShippingAddress(quote.shippingAddress());

quote.billingAddress.subscribe((address) => self.updateBillingAddress(address));
this.updateBillingAddress(quote.billingAddress());
},
afterPlaceOrder: function () {
const url = $.mage.cookies.get(config.redirectUrlCookieCode);
Expand Down

0 comments on commit dd3d128

Please sign in to comment.