mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Dispatch hosted fields loaded event
This commit is contained in:
parent
ab32a20f68
commit
da7450ccdf
2 changed files with 3 additions and 2 deletions
|
@ -24,11 +24,11 @@ class CheckoutBootstap {
|
|||
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
jQuery(document).on('hosted_fields_loaded', () => {
|
||||
jQuery('#saved-credit-card').on('change', () => {
|
||||
this.displayPlaceOrderButtonForSavedCreditCards()
|
||||
})
|
||||
}, 3000)
|
||||
});
|
||||
|
||||
this.switchBetweenPayPalandOrderButton()
|
||||
this.displayPlaceOrderButtonForSavedCreditCards()
|
||||
|
|
|
@ -100,6 +100,7 @@ class CreditCardRenderer {
|
|||
}
|
||||
}
|
||||
}).then(hostedFields => {
|
||||
document.dispatchEvent(new CustomEvent("hosted_fields_loaded"));
|
||||
this.currentHostedFieldsInstance = hostedFields;
|
||||
|
||||
hostedFields.on('inputSubmitRequest', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue