Created
April 13, 2018 06:54
-
-
Save shivapoudel/c8ba1ffff1d901a01ed63257da6b1112 to your computer and use it in GitHub Desktop.
WooCommerce - Change order button text strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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