I am trying to change a text in the WooCommerce checkout page from Shipping to Delivery from Your Order Section. I tried to open t
I used the solution by @Rahul S but I added the next code to change specific delivery text on cart and checkout.
I added this code to the function.php on my theme. It work on cart page and checkout page
You can replace ‘put-here-you-domain-i18n’ by you domain, by default it is ‘woocommerce’ by I recommend change it.
The code to add is:
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.
You can see this.