As reported internally in Slack, when logging out of the Mailchimp account, the settings do not remain persistent between logging out and logging in again. Although we are not clearing the settings, the saved list ID is cleared upon logout (added in #54), which requires re-selection after login. Additionally, updating the list sets default values for the settings, overwriting the saved ones.
This PR resolves the issue by preventing the saved Mailchimp list ID from being cleared on logout. The list ID will only be cleared on login if it is not available under the account. Therefore, if we log in with a different user account, the ID will be cleared. otherwise, it will remain unchanged
How to test the Change
Log in with Mailchimp and save the settings.
Log out.
Log in again with the same account and verify that all settings and the list remain selected as they were.
Log out again.
Log in with a different account and verify that the list in the Mailchimp settings is not selected.
Verify that the signup form on the front end does not render until the list is selected and saved in the settings.
Changelog Entry
Fixed - Ensure that the settings remain persistent between logging out of the account and logging in again.
Description of the Change
As reported internally in Slack, when logging out of the Mailchimp account, the settings do not remain persistent between logging out and logging in again. Although we are not clearing the settings, the saved list ID is cleared upon logout (added in #54), which requires re-selection after login. Additionally, updating the list sets default values for the settings, overwriting the saved ones.
This PR resolves the issue by preventing the saved Mailchimp list ID from being cleared on logout. The list ID will only be cleared on login if it is not available under the account. Therefore, if we log in with a different user account, the ID will be cleared. otherwise, it will remain unchanged
How to test the Change
Changelog Entry
Credits
Props @jeffpaul @iamdharmesh
Checklist: