Thread Starter
j_sagu
(@j_sagu)
Mike Jolley – I tried this but doesn’t seem to help. I want to change some of the text such as Basket Totals to i.e. Total Amount, or Update Basket to Update..is this something I need to edit within a html / css file? If so, where would it be located within the FTP?
carlosramosweb – I can’t read Portuguese so can;t understand the link you sent unfortunately 🙁
Thanks
Jas
This has worked for me. Add this code into your Child Theme Folder functions.php file:
/* change text shipping to delivery in checkout process */
add_filter(‘gettext’, ‘translate_reply’);
add_filter(‘ngettext’, ‘translate_reply’);
function translate_reply($translated) {
$translated = str_ireplace(‘Shipping’, ‘Delivery’, $translated);
return $translated;
}
I added this code to the function.php on my theme.
You can replace ‘put-here-you-domain-i18n’ by you domain, by default it is ‘woocommerce’ by I recommend change it.
add_filter( 'woocommerce_shipping_package_name' , 'woocommerce_replace_text_shipping_to_delivery', 10, 3);
/**
*
* Function to replace shipping text to delivery text
*
* @param $package_name
* @param $i
* @param $package
*
* @return string
*/
function woocommerce_replace_text_shipping_to_delivery($package_name, $i, $package){
return sprintf( _nx( 'Delivery', 'Delivery %d', ( $i + 1 ), 'shipping packages', 'put-here-you-domain-i18n' ), ( $i + 1 ) );
}
I hope help you.
Jose Carlos Ramos Carmenates