Automattic / newspack-blocks

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

fix(ras-acc): respect cart coupons on nyp submit #1885

Closed chickenn00dle closed 2 months ago

chickenn00dle commented 2 months ago

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/0/1207817176293825/1208344897866336/f

This PR fixes an issue where the checkout button nyp input would remove any applied coupons on submit.

Screenshot 2024-09-18 at 16 36 53

How to test the changes in this Pull Request:

  1. Set up a checkout button block for a product that has both coupons AND nyp enabled
  2. As a reader trigger the checkout modal via the checkout button and go through checkout until you get to the payment method section
  3. Input a valid coupon and submit. Verify the order review table and submit button update with the correct values
  4. Now input a valid NYP amount and submit. On epic/ras-acc the coupon will be removed. On this branch, it should not and everything should update correctly.

Other information: