mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Add GooglePay context handler classes
This commit is contained in:
parent
6a205d1413
commit
4a1d369ad2
11 changed files with 494 additions and 159 deletions
|
@ -2,6 +2,7 @@ import {useEffect, useState} from '@wordpress/element';
|
|||
import {registerExpressPaymentMethod, registerPaymentMethod} from '@woocommerce/blocks-registry';
|
||||
import {paypalAddressToWc, paypalOrderToWcAddresses} from "./Helper/Address";
|
||||
import {loadPaypalScript} from '../../../ppcp-button/resources/js/modules/Helper/ScriptLoading'
|
||||
import buttonModuleWatcher from "../../../ppcp-button/resources/js/modules/ButtonModuleWatcher";
|
||||
|
||||
const config = wc.wcSettings.getSetting('ppcp-gateway_data');
|
||||
|
||||
|
@ -28,6 +29,7 @@ const PayPalComponent = ({
|
|||
if (!loaded) {
|
||||
loadPaypalScript(config.scriptData, () => {
|
||||
setLoaded(true);
|
||||
buttonModuleWatcher.registerContextBootstrap(config.scriptData.context, this);
|
||||
});
|
||||
}
|
||||
}, [loaded]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue