Change WooCommerce button

Hi. I am trying to change the button “apply coupon” in WooCommerce but in the translation for WooCommerce it looks like I already is translated. WooCommerce support says that I should try to change this in the theme since it might be something that is overriding the translation.


So - I would like to change the text in this button into something swedish

Hello @TomasJarvling,

Thanks for writing in!

The keyword “Apply Coupon” is in line 286 of the x.pot or pro.pot file. You should be able to change it in your translation plugin. If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

I think I found it in x.pot.
But i get som warning saying that this is not recommended. Should I continue?
Tomas

Hi Tomas,

Glad you found it! That’s perfectly fine to do. It’s common to use plugins like Loco Translate to override strings from the theme.

Hi. I changed it in Loco translate but the button text unfortunately wasn’t changed.

Hello @TomasJarvling,

To better assist you with your issue, kindly provide us access to your site so that we can check your plugin settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi @TomasJarvling,

Thanks for reaching out!

I just check your Loco Translate settings and the setting just looks good. Then for some reason, the Apply Coupon Text is not translated. I suggest that you use the single sentence translation function to translate the text, please check this article for more information. I also tried using this on my website and it is working fine.

Hope that helps.

Thank you.

Great. Will try that. But shouldn’t I go to appearance-edit? I cannot find the edit option under appearance. So I do not know where to find the functions.php

naa. Sorry. I managed to change it in the functions.php via ftp. Case solved. Thanks

You are most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.