Home » WooCommerce » How to add Custom Paypal button text in WooCommerce Checkout?

How to add Custom Paypal button text in WooCommerce Checkout?

You can achieve this using gettext filter. here is the simple php code for this, place this code in functions.php

/**
 * Custom PayPal button text
 *
 */
add_filter('gettext', 'wpdumi_checkout_paypal_button_text', 20, 3);

function wpdumi_checkout_paypal_button_text($translated_text, $text, $domain)
{
    switch ($translated_text) {
        case 'Proceed to PayPal':
            $translated_text = __('Purchase', 'woocommerce');
            break;
    }
    return $translated_text;
}
Duminda Wijerathna

An all round web designer building websites Over 18 years. Interested in achieving a suitable placement in the field of IT in a growth oriented organization which offers diverse job responsibilities in order to utilize and improve my skills, Knowledge and experience.

Leave a Comment

Your email address will not be published. Required fields are marked *