Home›Support›English Support›[Resolved] Taxonomy values are shown twice in all translated language on front end
[Resolved] Taxonomy values are shown twice in all translated language on front end
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where taxonomy values are displayed twice in the translated languages on their WooCommerce product pages, despite appearing correctly in the default language. Solution:
We identified that the issue is caused by the Blocksy Companion PRO plugin.
The update 2.1.14 will fix the problem.
If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
I see the code snippet they proposed but I don't understand the reasoning behind it. Why exactly they need to define this current_language variable if it is not used anywhere in the template?
Of course we are willing to fix this problem but want to understand the full background of it. Probably would be best if their compatibility team would have a look (I see the problem is already escalated) and get back to us — usually they give pretty insightful turnarounds and we get the problem fixed pretty quickly from there.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
The compatilbity team identified code inside the Blocksy Companion plugin that is supposed to handle WPML translation, but the applied logic seems to be causing the issue.
Removing this entire function maybe_expand_term_ids_for_wpml_fallback_translations() solves the problem.
Sorry but I don't think this is related either, for this reasons:
1. The mentioned function is related to generating the lookup table and only affects what data ends up in the taxonomies lookup table.
2. This function runs only when the fallback translations are enabled for products, which is not the case on your site: hidden link
3. I commented it out and it for sure doesn't run and I still see two categories on your site: hidden link
4. After activating the Storefront theme, I still see the categories twice on your site: hidden link
For these reasons, I believe the problem comes from some other place.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I have forwarded this information to the compatilbity team.
This issue is not theme-related; it is related to Blocksy Companion (Premium), and it disappears if we disable the Shop Extras Option "Filters" and then update the translation and refresh the translated product page another time.
I am about to set up a local test site to test the proposed workaround and then let you know.
Also, note that the workaround is not only to remove the mentioned function. I shared a diffchecker link for more details.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I gave this another test.
The suggested workaround solved the issue, but after applying it, you need to update the original product. You can then test if the issue occurs again when creating a new translation, which will not be the case.
The class blocksy-companion-pro\framework\premium\extensions\woocommerce-extra\features\filters\includes\taxonomies-products-lookup-store.php will need to be adapted this way: hidden link
The update fixed the issue, so now you can have wishlist enabled and, by updating the translation of the product, I do not have doubled taxonomies on the front end.
Thank you very much for your work and effort.
I am closing this ticket.