Skip to content

Instantly share code, notes, and snippets.

@shivapoudel
Created April 13, 2018 06:54
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 shivapoudel/c8ba1ffff1d901a01ed63257da6b1112 to your computer and use it in GitHub Desktop.
Save shivapoudel/c8ba1ffff1d901a01ed63257da6b1112 to your computer and use it in GitHub Desktop.
WooCommerce - Change order button text strings
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_filter( 'gettext', 'custom_order_button_strings', 20 );
/**
* Change order button text strings.
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function custom_order_button_strings( $translated_text ) {
switch ( $translated_text ) {
case 'Proceed to HBL' :
$translated_text = __( 'Pay via HBL', 'woocommerce-hbl' );
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment