Skip to content

Instantly share code, notes, and snippets.

@itskawsar
Forked from MindyPostoff/gist:a10148daa110119b262f
Created December 10, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itskawsar/53b66273e43f1c007f08 to your computer and use it in GitHub Desktop.
Save itskawsar/53b66273e43f1c007f08 to your computer and use it in GitHub Desktop.
Change "Proceed to PayPal" Text on Checkout Button in WooCommerce
/* Change the "Proceed to PayPal" button text in the WooCommerce checkout screen
* Add this to your theme's 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 = __( 'NEW BUTTON TEXT', 'woocommerce' );
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment