0

In the Downloads tab of the My Account area in WooCommerce, by default the text says "No downloads available yet". I need to change this text to something more specific.

I would rather not do this by copying plugin files to my child theme, but would prefer to do it with code snippet.

If anyone can help, it would be massively appreciated.

Many thanks for your time.

Andrew Brown
  • 47
  • 1
  • 11

2 Answers2

-1

If you have access to ftp you can open the folder of Woocommerce plugin into a text editor. You can find for the string and replace it by a more specific one directly into the code. I think it's the cleanest way. Let me know if it works.

alex31
  • 94
  • 6
-1

You have different ways of doing this:

1- Copy wp-content/plugins/woocommerce/templates/myaccount/downloads.php to your theme folder inside /woocommerce folder and overwrite the part where the string is outputted -> recommended

2- Edit the woocommerce-[LANG_CODE]_[LANG_CODE].po file inside wp-content/languages/plugins but you would lose this if you update the plugin

3- If you have WPML installed you can do it via string-translation feature

4- Edit it via JS, not so clean but hey, it would work! :D

Diego
  • 1,610
  • 1
  • 14
  • 26
  • 1
    Then i guess you have to go with the 4th option, since with the 2nd you lose the update. Keep in mind that woocommerce template are made to be overridden by files in your theme folder, they natively support and suggest it as a best practice. I don't see any bad thing in doing that. If they will ever update the original file you just need to adapt the changes. In this particular case the file is so small (speaking of code-content) that you could do it very easily and maybe it will never come the moment of doing it at all – Diego Sep 02 '20 at 14:38