Skip to content

Commit

Permalink
Fix GPay button missing in Safari (#9266)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelzaleski authored Aug 16, 2024
1 parent ddad19f commit f7ee681
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-9202-ece-gpay-missing-on-safari
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix GooglePay button missing in Safari.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ const getPaymentMethodsOverride = ( enabledPaymentMethod ) => {
paypal: 'never',
};

const enabledParam = [ 'applePay', 'googlePay' ].includes(
enabledPaymentMethod
)
? 'always'
: 'auto';

return {
paymentMethods: {
...allDisabled,
[ enabledPaymentMethod ]: 'auto',
[ enabledPaymentMethod ]: enabledParam,
},
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export const ExpressCheckoutPreviewComponent = ( {
},
paymentMethods: {
link: 'never',
googlePay: 'auto',
applePay: 'auto',
googlePay: 'always',
applePay: 'always',
},
layout: { overflow: 'never' },
};
Expand Down

0 comments on commit f7ee681

Please sign in to comment.