Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stale customerGroup in checkoutState #1321

Open
nowlena opened this issue Jan 18, 2022 · 1 comment
Open

Stale customerGroup in checkoutState #1321

nowlena opened this issue Jan 18, 2022 · 1 comment

Comments

@nowlena
Copy link

nowlena commented Jan 18, 2022

Describe the bug
There's an issue with the customer.customerGroup data being stale as returned by checkoutState.data.getCustomer().

To Reproduce

  1. [back-office] ensure setting for "guest" customers is "-- No Group --"
  2. [checkout] login via the Customer step
  3. [checkout] once logged in, click the "Sign Out" button back at the Customer step
  4. [checkout] the customer.customerGroup data will now be stale (the previously logged in user's customer group will still be the value)

Expected behavior
The customer group data should be accurate.

Additional context
When the new state is merged into the existing customer object, if customerGroup is undefined it will leave the previous value there, causing our state to become stale / inaccurate.

When Guest customers have a customer group assigned the key gets updated correctly... this is because the customerGroup value for those users is defined. The merging of old state into new has no problem in this case.

Created the original issue here but have not gotten feedback.

@nowlena
Copy link
Author

nowlena commented Oct 25, 2022

Any update on this? We build customizations that rely on this data being correct. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant