mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +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
|
@ -26,11 +26,11 @@ const GooglePayComponent = () => {
|
|||
const [paypalLoaded, setPaypalLoaded] = useState(false);
|
||||
const [googlePayLoaded, setGooglePayLoaded] = useState(false);
|
||||
|
||||
const manager = new GooglepayManager(buttonConfig, ppcpConfig);
|
||||
|
||||
const bootstrap = function () {
|
||||
const manager = new GooglepayManager(buttonConfig, ppcpConfig);
|
||||
manager.init();
|
||||
|
||||
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -43,7 +43,7 @@ const GooglePayComponent = () => {
|
|||
loadPaypalScript(ppcpConfig, () => {
|
||||
setPaypalLoaded(true);
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!bootstrapped && paypalLoaded && googlePayLoaded) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue