Skip to content

Commit d1ca5e5

Browse files
committed
MC-42968::PayPal Express not Working from Shopping Cart Page
1 parent ea236e7 commit d1ca5e5

File tree

1 file changed

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

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ define([
2424
this.renderPayPalButtons(element);
2525
this.declinePayment = !customer().firstname && !cart().isGuestCheckoutAllowed;
2626

27+
if (cart().isGuestCheckoutAllowed === undefined) {
28+
cart.subscribe(function (updatedCart) {
29+
this.declinePayment = !customer().firstname && !cart().isGuestCheckoutAllowed;
30+
return updatedCart;
31+
}.bind(this));
32+
}
33+
2734
return this;
2835
},
2936

0 commit comments

Comments
 (0)