phpwordpresswoocommercestripe-payments

Change WooCommerce Stripe Gateway description text


I have a site that's using WooCommerce & the WooCommerce Stripe Gateway plugin to handle payments through Stripe.

Currently when Stripe is selected at the checkout stage a message shows saying "Pay with your credit card via Stripe", is there a way of changing this message? I basically want it to say "Pay with your debit or credit card via Stripe" so it's clear it's not just credit card payments that are taken.

The best way I've come up with is to add an if statement into the /checkout/payment-method.php file that will output $gateway->payment_fields(); for all payment methods except Stripe & hard code the output for Stripe instead.

Is there anyway of just altering the output of $gateway->payment_fields(); instead? As that would be a 'cleaner' way of doing it. I've tried storing $gateway->payment_fields(); to a variable then outputting it using a str_replace() but it appears $gateway->payment_fields(); just echos out its contents rather than returns it.


Solution

  • It's an admin setting. WooCommerce>Settings>Checkout>Stripe

    stripe admin settings