Change 'Select options' text under products in woocommerce widgets

Hi there,

I have an issue with changing ‘Select options’ text for variable products in woocommerce widgets on the front page in ‘Latest products’ section and on product pages as well. I use woocommerce Hungarian translation and also downloaded woocommerce customizer. I changed the the text in the .pot file and also in customizer, but no change in widgets. :frowning: I looked in almost all possible .php files (both woocommerce and theshop files) but I can’t seem to find the code where I can change this.
Same problem with the mini cart button in the menu area. It still says ‘item’.

Can you please advise where I can change woocommerce text for theshop?

My page I am working on is reszp.webartstyle.hu

Thanks a lot in advance for your prompt reply guys. :slight_smile:

Liana

Sorry, it was a ‘Measurement price calculator’ translation issue. It is solved, except for the ‘item’ text, but I’m still trying. :slight_smile: Thanks anyway. Liana

Hello Liana,

How did you add mini cart button to the menu area (did you use some plugin for that)?

Kind Regards, Roman.

Hi Roman,

It was there originally when I started using your theme, i did not use any plugin for that. Did you look at my site? Maybe I used the wrong name for it, but i meant the little orange cart button in the menu line. It might belong to some woocommerce plugin though…

Liana

Okay Liana,

I tried to replicate it on my localhost, but I did not find option to add mini cart button to the menu area in WooCommerce.

You mentioned that you downloaded WooCommerce Customizer, can you please try to deactivate all plugins except WooCommerce and see if mini cart button in the menu area disappears?

Kind Regards, Roman.

Hi,

I deactivated all plugins except woocommerce, and it is still there. :slight_smile: It surely comes from woocommerce.

Kind regards,
Liana

Hello Roman,

Good news. I’ve found the source. It is in theshop/woocommerce/woocommerce.php Update cart section. Now please help. I tried to copy this bit of code into my child themes’s functions.php but the whole site crashed. I also tried to create a woocommerce.php file in the child theme and copy this bit in there, but the same thing happened. Can you please help how to put it in my child theme so that I can change the cart text?

Thanks a lot.
Regards
Liana

Hello Liana,

I checked that and I found that wp-content/themes/theshop/woocommerce/woocommerce.php file is required from wp-content/themes/theshop/functions.php.

So to override it in your child theme you have to comment out it from functions.php file of parent theme (it’s the last line of code). Also, you will have to repeat that after every theme update.

I really hope that it will help you.

Kind Regards, Roman.

Dear Roman,

Thanks, but I still have questions. Sorry, I’m not very advanced in coding. :slight_smile:

So if I comment it out in the parent theme’s function.php file, the whole woocommerce.php file will be ignored. So the solution you are suggesting is to copy the woocommerce.php file in the child theme’s directory or shall i copy the included php codes into the child theme’s functions.php?

Thanks.
Liana

Okay Liana,

Since you will have to make changes to parent theme after every update anyway, I suggest you to edit that file directly and make a backup/copy it to your computer (so you will be able to easily repeat it after parent theme update).

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Dear Roman,

I changed the texts in the parent theme. It is good enough for now. Thank you for the help. :slight_smile:

Kind regards,
Liana

You are welcome Liana,

I am glad that everything is good now :slight_smile:

Kind Regards, Roman.

Hi Liana/Roman

I have exactly the same problem. I want to change the ‘Select options’ text for variable products on front page (latest products section) and the product pages as well. I am also using the price measurement calculator and theme TheShop. I was wondering how you solved this issue. Hope you can help me out. Thanks!

Kind regards,

Romy :slight_smile:

Hello Romy,

Can you please create a new topic for your question with more details including explanatory screenshots and a link to your website?

You can upload screenshots to your WordPress Media Library and share a link, or you can use one of the online screenshot services.

Kind Regards, Roman.