When “Show all languages” is selected, e.g. on the product listing page, pll_current_language() returns false, but we can still get the language for the current post, by falling back to pll_get_post_language().
Upload the zip file as a plugin to your WordPress site and activate it like a normal plugin. There are some instructions in the link in step 1 if you scroll down on how to use the plugin.
When “Show all languages” is selected, e.g. on the product listing page,
pll_current_language()
returns false, but we can still get the language for the current post, by falling back topll_get_post_language()
.