Automattic / newspack-blocks

Gutenberg blocks for the Newspack project.
208 stars 43 forks source link

fix(ras-acc): intermittent auth + checkout flow error #1893

Closed chickenn00dle closed 1 month ago

chickenn00dle commented 1 month ago

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/0/1207817176293825/1208379852549374

Fixes an issue where when modal checkout renders the cart with no errors, the modal is left in a loading state infinitely: Screenshot 2024-10-10 at 13 14 43

How to test the changes in this Pull Request:

This is very difficult to reproduce since the case of modal checkout rendering the cart page with no errors seems to only happen on the Hyperallergic beta test site, but we can mimic this by commenting out the following line of code: https://github.com/Automattic/newspack-blocks/blob/4bb284340a70750f9e2f65587510678424aeff93/includes/class-modal-checkout.php#L253

  1. With the above line of code commented out, initiate the checkout modal via a checkout button.
  2. Confirm you see a generic error with a back button appear in the modal: Screenshot 2024-10-10 at 13 17 40
  3. Uncomment the code above back in, and smoke test the checkout modal to confirm nothing has broken

Other information: