Classic checkout js broken with custom templates #9447
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.
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.The text was updated successfully, but these errors were encountered: