Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modal-checkout): tweak HTML to satisfy Woo Payments field validation #1883

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

miguelpeixe
Copy link
Member

@miguelpeixe miguelpeixe commented Sep 16, 2024

All Submissions:

Changes proposed in this Pull Request:

1200530782742699-as-1208317393051728/f

Since this change in WooCommerce Payments our modal checkout crashes when attempting to submit a payment. Our 2-step approach generates hidden inputs containing the billing information from the 1st step. These inputs are not in the HTML structure WooCommerce Payments expects for front-end field validation.

This PR tweaks the HTML so the hidden inputs are inside .form-row nodes, satisfying the WooComerce Payments js.

How to test the changes in this Pull Request:

  1. Setup WooCommerce Payments in sandbox mode (read more here: https://woocommerce.com/document/woopayments/testing-and-troubleshooting/sandbox-mode/)
  2. While in the release branch, attempt to donate via Donate block
  3. Confirm the modal checkout page refreshes after a trying to submit the payment with an error notice
  4. Check out this branch
  5. Donate and confirm the payment goes through

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?

Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue!

@miguelpeixe miguelpeixe merged commit 16b5e9d into release Sep 17, 2024
10 checks passed
@miguelpeixe miguelpeixe deleted the hotfix/modal-checkout-hidden-inputs-html branch September 17, 2024 12:16
matticbot pushed a commit that referenced this pull request Sep 17, 2024
## [4.1.2](v4.1.1...v4.1.2) (2024-09-17)

### Bug Fixes

* **modal-checkout:** tweak HTML to satisfy Woo Payments field validation ([#1883](#1883)) ([16b5e9d](16b5e9d))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Sep 17, 2024
# [4.2.0-alpha.3](v4.2.0-alpha.2...v4.2.0-alpha.3) (2024-09-17)

### Bug Fixes

* **modal-checkout:** tweak HTML to satisfy Woo Payments field validation ([#1883](#1883)) ([16b5e9d](16b5e9d))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.2.0-alpha.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants