This PR addresses an issue where if checkout data is present in local storage, the auth flow will always skip the newsletters signup step. We fix this by adding an explicit skipNewslettersSignup flag to the auth modal config object and using this to decide whether to bypass the newsletters modal instead.
How to test the changes in this Pull Request:
As admin, ensure the Present newsletter signup after checkout and registration setting is enabled and newsletter lists are selected via Newspack > Engagement > Show Advanced Settings
As a logged out reader, visit any page with a donate or checkout button
Trigger the auth + checkout flow by clicking the button
Do not submit the form. Instead close it via the close button at the top right of the modal
Click the Sign in button in the site header to trigger just the auth flow
Select the Create an account button in the auth modal and register a new account
Confirm the newsletter signup modal appears as the final step of the auth flow
Bonus:
Smoke test the auth + checkout flow with newsletters signup modal
Smoke test accessing restricted content after purchasing the necessary subscription/donation product on the content restricted post/page (the page should reload AFTER auth/checkout is complete)
Other information:
[ ] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes, as applicable?
[ ] Have you successfully ran tests with your changes locally?
All Submissions:
Changes proposed in this Pull Request:
Closes https://app.asana.com/0/inbox/1206274567818680/1208232700780031/1208232700780049/f
This PR addresses an issue where if checkout data is present in local storage, the auth flow will always skip the newsletters signup step. We fix this by adding an explicit skipNewslettersSignup flag to the auth modal config object and using this to decide whether to bypass the newsletters modal instead.
How to test the changes in this Pull Request:
Present newsletter signup after checkout and registration
setting is enabled and newsletter lists are selected via Newspack > Engagement > Show Advanced SettingsCreate an account
button in the auth modal and register a new accountBonus:
Other information: