The get_upe_available_payment_method_ids updated in the PR Change display order upe methods introduced a problem, the payment method shown on the Stripe settings page is not getting filtered by supported countries anymore.
Steps to reproduce the issue
Connect to an US Stripe account.
Enable the new checkout experience and go to the payment methods tab.
Click the Change display order button and change the order of a few methods. Save your changes.
Notice that the payment method list has all the UPE methods showing up on the list.
Now connect to a different Stripe account (e,g India) that does not support some of the UPE methods like Klarna, Affirm etc.
Notice that the payment method list still has all the UPE methods showing up on the list.
Changes proposed in this Pull Request:
Fixed the logic in get_upe_available_payment_method_ids and renamed it to get_upe_ordered_payment_method_ids.
Testing instructions
Connect to an US Stripe account.
Enable the new checkout experience and go to the payment methods tab.
Click the Change display order button and change the order of a few methods. Save your changes.
Notice that the payment method list has all the UPE methods showing up on the list.
Enable a few methods and as a shopper confirm that on the shortcode checkout page the payment methods are rendered in saved order.
Now connect to a different Stripe account (e,g India) that does not support some of the UPE methods like Klarna, Affirm etc.
Confirm that the payment method list now excludes the unsupported methods.
Additiona testing
Test the reordering for both new and legacy checkout experience.
Switch to different Stripe accounts and confirm that the payment method list is showing the supported methods only.
Try reordering, enabling/disabling methods after switching to different Stripe accounts. Confirm that the checkout page is following the settings.
For both legacy and new experience, use the Customize button beside any payment method and confirm that the changes persist after updating the title and description. Also it should be reflected on the checkout page.
The
get_upe_available_payment_method_ids
updated in the PR Change display order upe methods introduced a problem, the payment method shown on the Stripe settings page is not getting filtered by supported countries anymore.Steps to reproduce the issue
payment methods
tab.Change display order
button and change the order of a few methods. Save your changes.Changes proposed in this Pull Request:
get_upe_available_payment_method_ids
and renamed it toget_upe_ordered_payment_method_ids
.Testing instructions
payment methods
tab.Change display order
button and change the order of a few methods. Save your changes.Additiona testing
Customize
button beside any payment method and confirm that the changes persist after updating the title and description. Also it should be reflected on the checkout page.