Skip to content

Commit e25b678

Browse files
committed
Merge remote-tracking branch 'origin/AC-13814' into spartans_pr_30012025
2 parents 08c46b9 + 5c96a1f commit e25b678

File tree

1 file changed

+8
-1
lines changed
  • app/code/Magento/Paypal/view/frontend/web/js/view

1 file changed

+8
-1
lines changed

app/code/Magento/Paypal/view/frontend/web/js/view/paylater.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,16 @@ define([
4747
* @returns {*}
4848
*/
4949
initialize: function () {
50-
let buyerCountry = customerData.get('paypal-buyer-country');
50+
let customer = customerData.get('customer'),
51+
buyerCountry = customerData.get('paypal-buyer-country');
5152

5253
this.buyerCountry = buyerCountry().code;
54+
55+
if (customer().firstname && !this.buyerCountry) {
56+
customerData.reload(['paypal-buyer-country'], false);
57+
this.buyerCountry = customerData.get('paypal-buyer-country')().code;
58+
}
59+
5360
this._super()
5461
.observe(['amount']);
5562

0 commit comments

Comments
 (0)