Skip to content

Instantly share code, notes, and snippets.

@cpaul007
Created October 30, 2020 14:36
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 cpaul007/e94ee0b8cb0ad9155c1b2e1d89fcacae to your computer and use it in GitHub Desktop.
Save cpaul007/e94ee0b8cb0ad9155c1b2e1d89fcacae to your computer and use it in GitHub Desktop.
Change the Checkout Button Text
<?php
add_filter( 'gettext_woocommerce', 'ouwoo_checkout_button_text', 10, 3);
function ouwoo_checkout_button_text( $translated_text, $text, $domain ) {
switch( $translated_text ) {
case 'Checkout' :
$translated_text = "ENTER YOUR TEXT HERE";
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment