Return 'false' for 'canMakePayment' only when express checkout is disabled.
Added 'checkPaymentMethodIsAvailable' function for blocks (same as WooPayments)
Reproduce the issues
Enable the ECE feature flag (return true from is_stripe_ece_enabled function or in your database add an option _wcstripe_feature_ece and set yes as the value).
Enable Google Pay/ Apple Pay from the Stripe settings page.
Go to localhost:8082, add a product to your cart and check the block cart and checkout page.
Notice that there is an empty express checkout section displayed. (Issue 1)
Use a publicly accessible link for your site (jurassic tube or ngrok).
Add many or expensive products to your cart so that the cart total is beyond $1,000,000.00 USD (or 1.000.000,00 EUR). - Notice that an empty express checkout section is loaded. (Issue 2)
Now disable Google Pay/ Apple Pay from the Stripe settings page.
Add a product to your cart and check the block cart and checkout page.
Notice that there is an empty express checkout section displayed. (Issue 3)
Screenshots
Cart page
Checkout page
Testing instructions
Follow the steps to reproduce the issues in this branch and confirm that the empty express checkout section is not displayed anymore.
Fixes #3470
Changes proposed in this Pull Request:
Reproduce the issues
true
fromis_stripe_ece_enabled
function or in your database add an option_wcstripe_feature_ece
and setyes
as the value).localhost:8082
, add a product to your cart and check the block cart and checkout page.Screenshots
Cart page
Checkout page
Testing instructions
Follow the steps to reproduce the issues in this branch and confirm that the empty express checkout section is not displayed anymore.