Description
openedon Aug 22, 2022
Describe the bug
Spun off from #3546, see comment from @thenbrent.
WCPay provides various payment methods for shoppers, e.g. credit card, SEPA, iDEAL etc. Some are provided direct and others are provided via the Stripe UPE (aka new checkout experience
).
Currently we don't provide clear guidance as to which payment methods are supported for subscriptions. There's an Automatic Recurring Payments column in WooCommerce > Settings > Payments screen, and it currently displays a tick/checkmark. We need to iterate on this and update docs to clarify what payment methods are supported.
Proposed solution
(thanks @aheckler !)
- Hook
woocommerce_payment_gateways_renewal_support_status_html
to clarify status and PM support for WCPay Subs. - Use wording similar to below example.
function akh_wcpay_custom_text( $status_html, $gateway ) {
if ( 'woocommerce_payments' === $gateway->id ) {
$status_html = '<span class="status-enabled tips" data-tip="' . esc_attr__( 'Subscriptions with WooCommerce Payments is available in preview for U.S. accounts and card payments only.', 'woocommerce-subscriptions' ) . '">' . esc_html__( 'Yes', 'woocommerce-subscriptions' ) . '</span>';
}
return $status_html;
}
add_filter( 'woocommerce_payment_gateways_renewal_support_status_html', 'akh_wcpay_custom_text', 10, 2 );
To Reproduce
- Go to WooCommerce > Settings > Payments screen with WCPay enabled and subscriptions operational.
Should be clear info about which payment methods are supported for subscriptions and what to expect. Could also link out to documentation.
Note that this will need to handle UPE enabled and disabled, and provide clear info about all the payment methods available/enabled on a store through UPE x WCPay.