You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When WooPayments is enabled with multiple payment methods also enabled, we expect that all of these payment methods should appear together at checkout and prioritised to appear at the top of the list of enabled payment gateways. However, this does not currently appear to be the case: only the CC payment method is prioritised and the other gateways will appear separately nearer to the bottom of the list of available gateways.
WooPayments list of available gateways separated at checkout
I believe this is happening, because while we do have code to reorder the list of available payment gateways and prioritise WooPayments, currently this only acts on the CC gateway with default woocommerce_payments slug. With the split UPE integration, each payment method is registered as its own separate payment gateway with a unique slug (i.e. woocommerce_payments_{ PAYMENT METHOD ID }). These additional gateways are not currently included in this gateway reordering.
We would like to amend this by improving this line of code to loop through all available gateway slugs and perform the same operation, so that these additional WooPayments gateways are also prioritised.
The desirable order of payment gateways at checkout should be as follows.
WooPayments CC
Other WooPayments PMs
Other non-WooPayments PMs
Note that, while I believe I have identified the source of this misalignment, we should also investigate whether ordering on the blocks checkout relies on the same code or needs a separate solution. Ideally, we would like to resolve this issue for all WooPayments gateways on both blocks and shortcode checkouts, but if blocks checkouts require a more involved or unrelated fix, we could move this to a separate issue, if the effort required is deemed substantial enough.
To Reproduce
Currently, the ordering of payment gateways by WooCommerce is dependent on the order that payment gateways are enabled, whereby newer payment gateways enabled more recently will receive lower prioritisation in this list of presented payment gateways. Consequently, this bug can be reproduced with the following steps.
Onboard a new site to WC. Enable some non-WooPayments payment methods.
Install WooPayments, onboard site, and add some new payment methods in addition to the CC payment method.
Visit checkout.
You should see WooPayments CC as the top payment gateway, then the payment methods enabled in step 1, followed by the WooPayments payment methods enabled in step 2.
Actual behavior
This is the reproducible and inccorect ordering of payment gateways at checkout.
WooPayments CC
Other non-WooPayments PMs
Other WooPayments PMs
Screenshots
See above.
Expected behavior
The desirable order of payment gateways at checkout should be as follows.
WooPayments CC
Other WooPayments PMs
Other non-WooPayments PMs
The text was updated successfully, but these errors were encountered:
Describe the bug
When WooPayments is enabled with multiple payment methods also enabled, we expect that all of these payment methods should appear together at checkout and prioritised to appear at the top of the list of enabled payment gateways. However, this does not currently appear to be the case: only the CC payment method is prioritised and the other gateways will appear separately nearer to the bottom of the list of available gateways.
WooPayments list of available gateways separated at checkout
I believe this is happening, because while we do have code to reorder the list of available payment gateways and prioritise WooPayments, currently this only acts on the CC gateway with default
woocommerce_payments
slug. With the split UPE integration, each payment method is registered as its own separate payment gateway with a unique slug (i.e.woocommerce_payments_{ PAYMENT METHOD ID }
). These additional gateways are not currently included in this gateway reordering.We would like to amend this by improving this line of code to loop through all available gateway slugs and perform the same operation, so that these additional WooPayments gateways are also prioritised.
The desirable order of payment gateways at checkout should be as follows.
Note that, while I believe I have identified the source of this misalignment, we should also investigate whether ordering on the blocks checkout relies on the same code or needs a separate solution. Ideally, we would like to resolve this issue for all WooPayments gateways on both blocks and shortcode checkouts, but if blocks checkouts require a more involved or unrelated fix, we could move this to a separate issue, if the effort required is deemed substantial enough.
To Reproduce
Currently, the ordering of payment gateways by WooCommerce is dependent on the order that payment gateways are enabled, whereby newer payment gateways enabled more recently will receive lower prioritisation in this list of presented payment gateways. Consequently, this bug can be reproduced with the following steps.
Actual behavior
This is the reproducible and inccorect ordering of payment gateways at checkout.
Screenshots
See above.
Expected behavior
The desirable order of payment gateways at checkout should be as follows.
The text was updated successfully, but these errors were encountered: