We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 08c46b9 + 5c96a1f commit e25b678Copy full SHA for e25b678
app/code/Magento/Paypal/view/frontend/web/js/view/paylater.js
@@ -47,9 +47,16 @@ define([
47
* @returns {*}
48
*/
49
initialize: function () {
50
- let buyerCountry = customerData.get('paypal-buyer-country');
+ let customer = customerData.get('customer'),
51
+ buyerCountry = customerData.get('paypal-buyer-country');
52
53
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
60
this._super()
61
.observe(['amount']);
62
0 commit comments