godaddy-wordpress / godaddy-wordpress/wc-plugin-framework

Payment form JS isn't loaded at checkout for free orders

Open
#326 4 comments 0 reactions 0 assignees View on GitHub
Bug Payment Gateway
Dominant language
PHP
Stars
146
Forks
43
Avg merge
21m
Merged PRs (30d)
3

Description

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](https://github.com/skyverge/wc-plugin-framework/blob/master/woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php#L980) 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](https://secure.helpscout.net/conversation/728349261/94602/) would like for the JavaScript to not show up on all their pages.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.