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.
1 parent fee5d2e commit 60521f5Copy full SHA for 60521f5
app/code/Magento/Paypal/view/frontend/web/js/view/paylater.js
@@ -47,9 +47,17 @@ define([
47
* @returns {*}
48
*/
49
initialize: function () {
50
+ let customer = customerData.get('customer');
51
let 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
+ buyerCountry = customerData.get('paypal-buyer-country');
58
+ this.buyerCountry = buyerCountry().code;
59
+ }
60
61
this._super()
62
.observe(['amount']);
63
0 commit comments