Closed
Description
Preconditions (*)
- Magento 2.3.2
- Paypal Express checkout enabled
- Paypal In-Context mode enabled
- Paypal Show in cart enabled
- Paypal guest checkout enabled
Steps to reproduce (*)
- Guest user, first time on the shop (no localStorage or session)
- Add any product to cart
- Click Paypal button to start express checkout
Expected result (*)
- Popup to login to Paypal opens
Actual result (*)
- Error message
To check out, please sign in with your email address.
appears and checkout is not possible
The problem can also be reproduced by clearing local storege in cart and refreshing the page.
The issue is here. customerData.get('cart')
is empty when this code runs for guests or users with no localStorage.