Unable to change the word “shipping”
-
I am using your plugin and its great, thanks… but I have one small issue.
I wanted to change the word “Shipping” to “Delivery” on the Basket and checkout and I managed to do this by adding this to the functons.php in my child theme:
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;
}This seems to be the accepted method to change that word, however, when I activate your plugin, the word “Shipping” comes back and nothing I do will change it.
There is no English language file in the plugin to edit, so that wont work.
I had to finally edit the file called “cart-shipping.php” in your plugin folder > woocommerce > cart
The problem with this is that if I updated the plugin my edits will be overwritten.I was hoping you might look at this and make the necessary updates so that the child theme functions.php edits will work and that I wont need to keep editing the plugin files directly.
Thanks
- The topic ‘Unable to change the word “shipping”’ is closed to new replies.