@lorro
BTW
Your code above gave a fatal error!
I dug around on the net and found these two snippets of code here:
https://stackoverflow.com/questions/31017626/how-to-change-woocommerce-text-shipping-in-checkout
Snippet #1
To change “Shipping” to “Delivery” on the Cart and Checkout Pages:
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 ) );
}
Snippet #2
To change “Shipping” to “Delivery” on the Order-Received page e.g.
https://example.com/checkout/order-received
/*
* Change the string "Shipping" to "Delivery" on Order Received page.
*/
add_filter('gettext', 'translate_reply');
add_filter('ngettext', 'translate_reply');
function translate_reply($translated) {
$translated = str_ireplace('Shipping', 'Delivery', $translated);
return $translated;
}
I must say needing 2 pieces of code and a plugin to change Shipping to Delivery is either incompetence on my behalf or is it that WooCommerce is deliberately designed in such a way as to make life as difficult as possible for the average developer?