Tagged: Cart, checkout, woocomerce
I am trying to change the text that says Shipping when you view cart and when you checkout. I tried adding this to my functions.php and it’s not doing anything.
// change shipping text
add_filter(‘gettext’, ‘translate_reply’);
add_filter(‘ngettext’, ‘translate_reply’);
function translate_reply($translated) {
$translated = str_ireplace(‘Shipping’, ‘Delivery’, $translated);
return $translated;
}
Hey metrocitygirl,
I see that this filter doesn’t work anymore.
Try editing cart-totals.php directly on line 56, look for:
<td data-title="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>"><?php woocommerce_shipping_calculator(); ?></td>
Or try the plugin Loco Translate
Best regards,
Mike
so I see the ‘shipping’ text on both lines 55 and 56. I changed both of them to delivery and it isn’t doing anything. Am I missing something? Do I need to do other things besides just changing the text from shipping to delivery? I have also included the username and password for you to get into the backend and check the order process out.
Hi metrocitygirl,
The text on the line 55 is the one you’re looking for. It is a title, the other text will be used as an attribute in html, it will not be seen.
Best regards,
Victoria
Okay so that worked for the text next to the radio button but not the other text that is underneath the subtotal. I have looked at all the php files I could think of that would house that text but can’t locate it. Can you help?
Hi,
Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Basilis
okay thanks.
Hi,
Thank you for your understanding
Best regards,
Basilis