Skip to content

Commit 11217d3

Browse files
committed
Merge remote-tracking branch 'origin/MC-42968' into GL_PR_21102021
2 parents 780f9a0 + 40585f4 commit 11217d3

File tree

1 file changed

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

1 file changed

+8
-1
lines changed

app/code/Magento/Paypal/view/frontend/web/js/in-context/button.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ define([
2222

2323
this._super();
2424
this.renderPayPalButtons(element);
25-
this.declinePayment = !customer().firstname && !cart().isGuestCheckoutAllowed;
25+
26+
if (cart().isGuestCheckoutAllowed === undefined) {
27+
cart.subscribe(function (updatedCart) {
28+
this.declinePayment = !customer().firstname && !cart().isGuestCheckoutAllowed;
29+
30+
return updatedCart;
31+
}.bind(this));
32+
}
2633

2734
return this;
2835
},

0 commit comments

Comments
 (0)