beninabox
Forum Replies Created
-
Hi, @laceyrod
Thanks for the response. I updated the priority, and made the other changes you suggested. I’m still not seeing the new text being applied. Any thoughts?
Here is the full function I’m using now.
function replace_gateway_title( $title, $id ) { if( $title == 'Apple Pay (Stripe)' ) { return 'Apple Pay'; } elseif ( $title == 'Chrome Payment Request (Stripe)' ) { return 'Chrome Payment Request'; } else { return $title; } } add_filter( 'woocommerce_gateway_title', 'replace_gateway_title', 11, 2 );
Hi.
Thanks for the response.
I tried updating the filter, but didn’t see any change – I’m still getting ‘Apple Pay (Stripe) as the payment method.
Thanks
BenThanks @dougaitken – that’s a great help.
I’m a developer in other languages, but not at all experienced in PHP, so please excuse my naivety ?? .
I have the following code, but I wasn’t able to get it to work. Do you spot anything wrong?
function replace_gateway_title( $title ){ if( $title == 'Apple Pay (Stripe)' ){ return 'Apple Pay'; } elseif ( $title == 'Chrome Payment Request (Stripe)' ){ return 'Chrome Payment Request'; } } add_filter( 'woocommerce_gateway_title', 'replace_gateway_title', 5, 1 );
Thanks!
- This reply was modified 5 years, 8 months ago by Jan Dembowski.
Hey @dougaitken
Thanks for looking at this. I’ve had a quick look at that, but couldn’t get anywhere. If you do find some pointers, I’d greatly appreciate it ??