How to change the “Proceed to PayPal” button text on the WooCommerce checkout page

One of my client ask me to change the default PayPal button text “Proceed to PayPal”

When a customer gets to checkout, the final tab for ‘Review and Payment’ has a button at the bottom right that says ‘Proceed to PayPal’.

Can you change the text ‘Proceed to PayPal’ to say ‘Proceed to Payment’.

 

So, i found the way how we can change it and going to share with you.

Code Snippet:Add the following PHP code to your child theme functions.php file

add_filter( 'gettext', 'custom_paypal_button_text', 20, 3 );
function custom_paypal_button_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Proceed to PayPal' :
$translated_text = __( 'YOUR NEW BUTTON TEXT', 'woocommerce' );
break;
}
return $translated_text;
}

Here is the result we required

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

Please Allow Ads To continue providing free content and maintaining the quality of our website, we kindly ask you to allow ads. Your support is crucial for us to keep delivering valuable information to you. Thank you for your understanding and support!

براہ کرم اشتہارات کی اجازت دیں

ہماری ویب سائٹ پر مفت مواد فراہم کرنے اور اس کے معیار کو برقرار رکھنے کے لیے، براہ کرم اشتہارات کی اجازت دیں۔ آپ کی مدد ہمارے لیے قیمتی معلومات فراہم کرنے میں اہم کردار ادا کرتی ہے۔ آپ کے تعاون کا شکریہ