You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There's an issue with the customer.customerGroup data being stale as returned by checkoutState.data.getCustomer().
To Reproduce
[back-office] ensure setting for "guest" customers is "-- No Group --"
[checkout] login via the Customer step
[checkout] once logged in, click the "Sign Out" button back at the Customer step
[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.
Describe the bug
There's an issue with the
customer.customerGroup
data being stale as returned bycheckoutState.data.getCustomer()
.To Reproduce
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, ifcustomerGroup
isundefined
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.
The text was updated successfully, but these errors were encountered: