As the question, you can guess, I'm building my own theme for Woccommerce, the store is a multilingual store, and after carefully creating all the pages in two languages, I have to take care of the products, to do this, I use a plugin that is who loves: WooCommerce Polylang Integration
Which just like Polylang, does the same job that is it allows the user to specify a product and adapt the same in x, languages that the user has previously chosen.
But now I am faced with a problem!
I have two languages, selected in my Woocommerce store. If a product is not available in a language, when I go to that single product and click on the language to which that product is not associated with a product, it will bring me back home
My question:
How do I specify the current product flag if second language translation is not available for that product
Simplified: if I have a product with only one language, how can I only show the flag of the language associated with that product
Echo flags:
<?php pll_the_languages(array('show_flags'=>1,'show_names'=>0)); ?>