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
function my_coupon_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Coupon code' : | |
$translated_text = __( 'My New Coupon Code Text', 'woocommerce' ); // Change text here | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'my_coupon_strings', 10, 3 ); |
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 | |
/* Changes the word Shipping to Delivery in the Woocommerce cart. Credit to Loictheaztec https://stackoverflow.com/a/53016991 */ | |
add_filter('woocommerce_shipping_package_name', 'change_shipping_text_to_delivery', 20, 3 ); | |
function change_shipping_text_to_delivery( $sprintf, $i, $package ) { | |
$sprintf = sprintf( _nx( 'Delivery', 'Delivery %d', ( $i + 1 ), 'delivery packages', 'woocommerce' ), ( $i + 1 ) ); | |
return $sprintf; | |
} | |
?> |
OlderNewer