Show button in PayPal gateway if Google Pay gateway is disabled

This commit is contained in:
Emili Castells Guasch 2024-07-17 16:39:53 +02:00
parent 39ffbaa6e7
commit e547d7e097
3 changed files with 23 additions and 9 deletions

View file

@ -63,8 +63,9 @@ class GooglepayButton {
.then( ( response ) => {
if ( response.result ) {
if (
this.context === 'checkout' ||
this.context === 'pay-now'
( this.context === 'checkout' ||
this.context === 'pay-now' ) &&
this.buttonConfig.is_wc_gateway_enabled === '1'
) {
const wrapper = document.getElementById(
'ppc-button-ppcp-googlepay'