mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🔀 Merge branch 'trunk'
This commit is contained in:
commit
964b9ac606
20 changed files with 483 additions and 122 deletions
|
@ -1,5 +1,11 @@
|
|||
.ppcp-button-googlepay {
|
||||
min-height: 40px;
|
||||
|
||||
.gpay-card-info-container,
|
||||
.gpay-button {
|
||||
outline-offset: -1px;
|
||||
border-radius: var(--apm-button-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block-woocommerce-checkout, .wp-block-woocommerce-cart {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import {loadCustomScript} from "@paypal/paypal-js";
|
||||
import {loadPaypalScript} from "../../../ppcp-button/resources/js/modules/Helper/ScriptLoading";
|
||||
import GooglepayManager from "./GooglepayManager";
|
||||
import {setupButtonEvents} from '../../../ppcp-button/resources/js/modules/Helper/ButtonRefreshHelper';
|
||||
|
||||
(function ({
|
||||
buttonConfig,
|
||||
|
@ -15,21 +16,12 @@ import GooglepayManager from "./GooglepayManager";
|
|||
manager.init();
|
||||
};
|
||||
|
||||
jQuery(document.body).on('updated_cart_totals updated_checkout', () => {
|
||||
setupButtonEvents(function() {
|
||||
if (manager) {
|
||||
manager.reinit();
|
||||
}
|
||||
});
|
||||
|
||||
// Use set timeout as it's unnecessary to refresh upon Minicart initial render.
|
||||
setTimeout(() => {
|
||||
jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {
|
||||
if (manager) {
|
||||
manager.reinit();
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue