Woocommerce Cart Page - Cart Total Section: Edit Content/Translation

Hello there.

I can’t find the translation of the specific part of the cart total section. In the secure note there’s a screenshot of the section mentioned.
Loco Translate is of no help here. So

a) I’d like to translate it properly - here I guess I’ll need to add something like this:

// Change Calculate Shippingto something else
// =============================================================================
function change_calculateshipping_text($translated) {
$translated = str_ireplace(‘Calculate Shipping’, ‘Upgrade shipping here’, $translated);
return $translated;
}
add_filter(‘gettext’, ‘change_calculateshipping_text’ );
// ==========================

but I need to address the “label” properly

b) to assign a custom class for the specific part, so I can hide it. Which of course is not really a solution but dirty workaround.

thx for any hint in advance.

Kind regards

Hello @VRANKOVINA,

Thank you for the inquiry.

Do we need to be logged in to add products to the cart? We are not able to check the cart page because we cannot find any products that can be added to the cart, and we are not sure of the assigned cart URL. Please provide the login details in the secure note so we can check the elements properly.

Are you using any extensions for the cart or checkout page?

Best regards,
Ismael

Yes you have to be logged in. Credentials in the secure note.

The only extension I use for woocommerce is German Market because all of the legal mumbo jumbo

Thank you for the update.

The login credentials are not available in the secure note. We checked further and found that when “Local Pickup” is selected, the text “Delivery” automatically changes to Collection". This behavior is expected when using the block editor for the cart page with the Shipping block.

Ah, I’m not sure what secure note you’re looking at, but in the one above I’m pretty sure that they are there.

Well, expected or not, the meaning - or the translation of it - is in this case false. In German, when you pick something somewhere up, you do not “collect” in term of “a collection of collectables” but you simply pick something up. The proper german term is “Abholen” and not “Sammeln”. It looks really odd with “Sammlung” and it won’t be accepted by the client for sure.

Thank you for the clarification. We installed the Say What? plugin and added an entry for the “Collection” string from the “woocommerce” domain and set its translation to “Abholen”. You can change this as you wish. Let us know if this works for you.

OK. Thank you very much. Works fine.
Follow up question: Am I right the Say What? Plugin could replace Loco Translate?
I’d love to reduce the amount of plugins on the site.

Hello Ondrej,

The Loco Translate plugin is a translation plugin at allows you to translate a plugin/s, theme and your WordPress site.

Say What plugin is a simple tool that can translate a word or group of groups instead of using the custom PHP code.

Thanks.

Ok. roger that. I wonder how this will go along with WPML.
Thx a heap for your support.

You are most welcome, Ondrej.