This snippet lets you modify the titles of payment gateways on the checkout page. By doing this, you enhance clarity for your customers.
To customize a payment gateway title, use the following code:
add_filter('woocommerce_gateway_title', 'custom_payment_gateway_title', 10, 2);
function custom_payment_gateway_title($title, $id) {
if ($id === 'paypal') {
return 'Secure PayPal Payment'; // Customize title
}
return $title;
}