I’m trying changing titles on WordPress Woocommerce shop page depends on which variation I’m using.
I’ve found one solution which works perfectly on product pages. I’m stuck now and need to change a little bit the code that will work on shop page too.
Here is the code for the product page:
It works perfectly, you can check the working code here:
http://tattodivi.nhely.hu/product/flower-lily/
I need one more solution which works on Woocommerce shop page too in this link:
http://tattodivi.nhely.hu/
If any of you can help me on this let me know.
Thanks.
2
Answers
The following code might work
This snippet will work only if you set default variation beforehand as its in the demo you provide.