Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Express Payment method being displayed on Blocks checkout when Payment Request is not supported #1831

Merged
merged 4 commits into from
Jun 1, 2021

Conversation

ricardo
Copy link
Member

@ricardo ricardo commented May 17, 2021

Changes proposed in this Pull Request

  • Add a test payment to the canMakePayment callback to test if payment request is supported.
  • Remove unnecessary canDoPaymentRequest function.

Testing instructions

  • Install WooCommerce Blocks and add a cart block to a page.
  • Remove your saved cards under chrome://settings/payments or use another browser (e.g. Opera or Brave) with no saved cards.
  • Test the develop branch and notice the -- OR -- section still shows up on the cart block page. Make sure you run npm start before testing.
  • Test this branch and notice the express payment section does not show up on the cart block if it's not supported (i.e. there are no cards saved to the browser).

  • Added changelog entry (or does not apply)
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

ricardo added a commit that referenced this pull request May 17, 2021
@ricardo ricardo force-pushed the fix/payment-request-can-make-payment branch from 5c24fd9 to b0bdc8e Compare May 17, 2021 19:37
@ricardo ricardo requested a review from asumaran May 17, 2021 19:49
@ricardo ricardo force-pushed the fix/payment-request-can-make-payment branch from c70f592 to b4ab816 Compare May 18, 2021 15:27
Copy link
Contributor

@asumaran asumaran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ismaeldcom pushed a commit that referenced this pull request May 27, 2021
ismaeldcom pushed a commit that referenced this pull request May 27, 2021
@ricardo ricardo force-pushed the fix/payment-request-can-make-payment branch from b4ab816 to 28262af Compare May 28, 2021 23:09
@ricardo ricardo force-pushed the fix/payment-request-can-make-payment branch from 28262af to 1e6385a Compare June 1, 2021 01:33
@ricardo ricardo merged commit a761d63 into develop Jun 1, 2021
@ricardo ricardo deleted the fix/payment-request-can-make-payment branch June 1, 2021 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants