Reputation: 121
I am running WooCommerce 2.6.2 on WP 4.5.3 and Sydney template.
On the WooCommerce Checkout Page (Order completed) under Order Details, I want to Change the 'Free Shipping' text to something else, or remove this row.
I also want to change or remove this row from the Emails sent to the Customer.
However, I can't get this text to Translate
I've added this to my functions.php
// Add this to your functions.php
add_filter('gettext', 'translate_reply');
add_filter('ngettext', 'translate_reply');
function translate_reply($translated) {
$translated = str_ireplace('Free Shipping', 'TBD', $translated);
return $translated;
}
but it doesn't work. That said, if I change just 'Shipping' then it translates the shipping label. I don't want to translate the Label, I want to translate the actual shipping method name.
This is getting frustrating. It don't think it should be this difficult to change a piece of text.
How can this be achieved?
Upvotes: 1
Views: 7677
Reputation: 41
If it still does not change in the frontend, go to WooCommerce > Status > tools and clear WC transients!
Upvotes: 1
Reputation: 253773
Normally you don't need any code for this. As there is big changes Since WooCommerce 2.6+ for Shipping settings options, I have divided my answer in 2 sections:
In Admin backend go to: WooCommerce
> settings
> Shipping
> Free shipping
You can:
In Admin backend go to: WooCommerce
> settings
> Shipping
> Shipping Zones
Then For each Shipping Zone
listed you can have (or not) Free Shipping
Shipping method enabled. So for each Shipping Zone
listed, you can:
Reference: WooCommerce rename "Free Shipping" field on checkout (old version until WC 2.5.x)
Upvotes: 5