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

Classic checkout js broken with custom templates #9447

Open
miguelpeixe opened this issue Sep 16, 2024 · 0 comments
Open

Classic checkout js broken with custom templates #9447

miguelpeixe opened this issue Sep 16, 2024 · 0 comments
Labels
focus: checkout payments good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.

Comments

@miguelpeixe
Copy link
Member

Describe the bug

#8502 introduced a change in the handling of the classic checkout that might break the form for custom templates.

In Newspack, we have a 2-step modal checkout experience that doesn't render the billing fields in the standard way when in the payment section. Instead, it renders them in hidden inputs because they have been previously edited.

Because the inputs are not inside a .form-row, the $formRow.classList.contains() call will cause a js crash and break the form submission. We're tweaking our strategy in Automattic/newspack-blocks#1883, but it would probably be a good idea to check if that node exists before the validation.

@miguelpeixe miguelpeixe added the type: bug The issue is a confirmed bug. label Sep 16, 2024
@c-shultz c-shultz added the good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. label Sep 18, 2024
@pierorocca pierorocca added the priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: checkout payments good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

4 participants