Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Display CC fields when a 100% coupon code that is added in cart is removed on checkout page #5277

Closed AashikP closed 1 year ago

AashikP commented 1 year ago

Describe the bug

If a 100% coupon code that is originally added in the cart page is removed on the checkout page, no credit card fields are displayed unless you reload the page.

To Reproduce

  1. You should either try to checkout as a guest user, or try a user with no saved payment method on the store
  2. Create a 100% coupon
  3. Add a product to cart, and use the coupon
  4. Proceed to checkout page and remove the coupon
  5. Notice that the credit card fields are only displayed when you reload the page
  6. Clicking on use a new payment method does not make a difference:

    ecDXYN.png

Actual behavior

When the coupon is originally added on the checkout page, everything works fine

vt1g9R.gif

When the coupon is first added on the cart page, the CC fields don't show up

nTxr53.gif

Expected behavior

If there are no payment method saved, CC fields should always be displayed.

Desktop (please complete the following information):

Any

Smartphone (please complete the following information):

Any

Additional context

Merchant reports:

5783438-zen

jessy-p commented 1 year ago

Might have same solution as #4764

hamadgill commented 1 year ago

looks like a similar issue any updates on a fix ?