Skip to content

Commit ba5fee9

Browse files
authored
Fix button preview for Apple Pay/Google Pay (#4628)
* Fix button preview for Apple Pay/Google Pay * Add changelog
1 parent 03da4d7 commit ba5fee9

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* Update - Show all available payment methods before unavailable payment methods
2727
* Tweak - Use smaller image for Optimized Checkout banner
2828
* Dev - Update WooCommerce Subscriptions e2e tests after 7.8.0 release
29+
* Fix - Display only Apple Pay and Google Pay buttons in the Customize page preview
2930
* Update - Add nightly task and WooCommerce tool to remove stale entries from our database cache
3031
* Dev - Make 'Add to cart' more robust in e2e tests
3132

client/entrypoints/amazon-pay-settings/express-checkout-button-preview.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ const ExpressCheckoutPreviewComponent = ( { size } ) => {
4444
buttonHeight: Math.min( Math.max( height, 40 ), 55 ),
4545
paymentMethods: {
4646
amazonPay: 'auto',
47-
link: 'never',
48-
googlePay: 'never',
49-
applePay: 'never',
5047
},
5148
layout: { overflow: 'never' },
5249
};

client/entrypoints/payment-request-settings/express-checkout-button-preview.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import InlineNotice from 'components/inline-notice';
99
import {
1010
EXPRESS_PAYMENT_METHOD_SETTING_APPLE_PAY,
1111
EXPRESS_PAYMENT_METHOD_SETTING_GOOGLE_PAY,
12+
PAYMENT_METHOD_CARD,
1213
} from 'wcstripe/stripe-utils/constants';
1314

1415
const buttonSizeToPxMap = {
@@ -38,6 +39,7 @@ const ExpressCheckoutPreviewComponent = ( { buttonType, theme, size } ) => {
3839
spacingUnit: '6px',
3940
},
4041
},
42+
paymentMethodTypes: [ PAYMENT_METHOD_CARD ],
4143
};
4244

4345
const height = buttonSizeToPxMap[ size ] || buttonSizeToPxMap.medium;

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
136136
* Update - Show all available payment methods before unavailable payment methods
137137
* Tweak - Use smaller image for Optimized Checkout banner
138138
* Dev - Update WooCommerce Subscriptions e2e tests after 7.8.0 release
139+
* Fix - Display only Apple Pay and Google Pay buttons in the Customize page preview
139140
* Update - Add nightly task and WooCommerce tool to remove stale entries from our database cache
140141
* Dev - Make 'Add to cart' more robust in e2e tests
141142

0 commit comments

Comments
 (0)