Skip to content

Commit 60521f5

Browse files
committed
AC-13814:Paypal Pay Later messgae is not displayed on cart page
1 parent fee5d2e commit 60521f5

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ define([
4747
* @returns {*}
4848
*/
4949
initialize: function () {
50+
let customer = customerData.get('customer');
5051
let 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+
buyerCountry = customerData.get('paypal-buyer-country');
58+
this.buyerCountry = buyerCountry().code;
59+
}
60+
5361
this._super()
5462
.observe(['amount']);
5563

0 commit comments

Comments
 (0)