Filtering payment method title on subscriptions shows wrong title
-
- Set up a WooCommerce site
- Install WooCommerce Subscriptions extension
- Enable legacy PayPal Standard gateway (will require a filter on new WC installs)
- Start a subscription on auto-renew with PayPal
- Install Stripe plugin (this one)
- Disable PayPal gateway
- View subscription details
- See “Manual Renewal” is the current payment method b/c PayPal has been disabled.
- Edit billing details
- See that in the dropdown, the Stripe payment option reads “PayPal”. It should show “Stripe”.
This plugin filters the payment gateway title, but this breaks for subscription orders and shows the original payment gateway title instead of the Stripe-related one.
In
class-wc-stripe-payment-request.php
, thefilter_gateway_title
function probably should only alter the title if it needs altered, or perhaps if it’s within a collection of known titles. It should return the$title
it was passed in all other cases, not the$method_title
it got off the order.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Filtering payment method title on subscriptions shows wrong title’ is closed to new replies.