When an order starts out as free at checkout, core doesn't render the payment methods UI. If the customer updates checkout, like choosing a new shipping method and $$$ needs to be charged, core refreshes checkout and ends up rendering the our gateway payment fields.
However, the way we enqueue the payment form JS handler means it'll only be present on initial page load, and not come along with any AJAX refreshes.
We'll need to change how we enqueue the JS so that it's present in the payment method form UI itself, or figure out some other way to load it on refresh.
- Report from: HS convo 94602 would like for the JavaScript to not show up on all their pages.
When an order starts out as free at checkout, core doesn't render the payment methods UI. If the customer updates checkout, like choosing a new shipping method and $$$ needs to be charged, core refreshes checkout and ends up rendering the our gateway payment fields.
However, the way we enqueue the payment form JS handler means it'll only be present on initial page load, and not come along with any AJAX refreshes.
We'll need to change how we enqueue the JS so that it's present in the payment method form UI itself, or figure out some other way to load it on refresh.