diff --git a/modules/ppcp-googlepay/resources/js/Block/components/GooglepayButton.js b/modules/ppcp-googlepay/resources/js/Block/components/GooglepayButton.js
index 368dedf89..3ae58dadf 100644
--- a/modules/ppcp-googlepay/resources/js/Block/components/GooglepayButton.js
+++ b/modules/ppcp-googlepay/resources/js/Block/components/GooglepayButton.js
@@ -8,9 +8,6 @@ const GooglepayButton = ( { namespace, buttonConfig, ppcpConfig } ) => {
const [ buttonHtml, setButtonHtml ] = useState( '' );
const [ buttonElement, setButtonElement ] = useState( null );
const [ componentFrame, setComponentFrame ] = useState( null );
-
- const buttonLoader = '
Loading Google Pay...
';
-
const isPayPalLoaded = usePayPalScript( namespace, ppcpConfig );
const isGooglepayLoaded = useGooglepayScript(
@@ -46,7 +43,7 @@ const GooglepayButton = ( { namespace, buttonConfig, ppcpConfig } ) => {
return (
);
};
diff --git a/modules/ppcp-googlepay/resources/js/Block/hooks/useGooglepayApiToGenerateButton.js b/modules/ppcp-googlepay/resources/js/Block/hooks/useGooglepayApiToGenerateButton.js
index febb3d6af..fe5b342a7 100644
--- a/modules/ppcp-googlepay/resources/js/Block/hooks/useGooglepayApiToGenerateButton.js
+++ b/modules/ppcp-googlepay/resources/js/Block/hooks/useGooglepayApiToGenerateButton.js
@@ -29,11 +29,6 @@ const useGooglepayApiToGenerateButton = (
environment: 'TEST',
} );
- console.log( 'paymentsClient', paymentsClient );
-
- console.log( 'googlepayConfig', googlepayConfig );
- console.log( 'buttonStyles?.Default', buttonStyles?.Default );
-
const googlePayButtonOptions = {
allowedPaymentMethods: googlepayConfig.allowedPaymentMethods,
buttonColor: buttonConfig.buttonColor || 'black',
@@ -44,13 +39,11 @@ const useGooglepayApiToGenerateButton = (
const button = paymentsClient.createButton( {
...googlePayButtonOptions,
- onClick: () => {
- console.log( 'Google Pay button clicked' );
+ onClick: ( event ) => {
+ event.preventDefault();
},
} );
- console.log( 'Google Pay Button options', googlePayButtonOptions );
-
setGooglepayButton( button );
return () => {