Hi,
We are currently experiencing 2 issues with our variable, virtual + downloadable products on our website. Our primary language is Bulgarian and we're translating to German (language version is public) and English (language version is hidden).
Issue #1: We have 2 global attributes - Възраст and Цвят, with a few terms in each. Before we ever created or translated our variable products, we first translated the attributes via the Taxonomy translation - each term + labels and slug. The terms are synchronized correctly, but the terms labels don't appear translated on the frontend only for the German version. Example:
BG: hidden link
EN: hidden link -> see example how it's translated: hidden link
DE: hidden link -> see example how it's translated: hidden link
IMPORTANT: The terms are synchronized and we don't have an issue with them, it's only the label that's not shown translated in the DE frontend specifically.
The product translations are synched from BG to both EN and DE. We are translating via the Advanced translation editor. We tried translation via the WP admin -> Products, as well as setting it up as a job translation and translation via the WP admin -> WPML -> Translations menu. None fixed the issue.
Some more things we've tried:
1. Transients cleanup via WP Rocket database optimization
2. WPML cache clearing + all caches cleared in general (Elementor, WP Rocket)
3. WooCommerce -> Status -> Tools -> Clear transients and Clear WooCommerce transients + Regenerate product lookup tables
4. WPML -> Support -> Troubleshooting -> Fix element_type collation
5. WPML -> Support -> Troubleshooting -> Set language information
6. WPML -> Support -> Troubleshooting -> Fix terms count
7. Small change in the original BG product -> Saving -> resynchronize translation
8. These texts don't appear in Strings translation, nor in Admin texts - we don't think they are supposed to, as they are not translated as single strings, but an FYI for you
Additionally, we were able to determine:
1. The DE attribute label translations are corrupted in WooCommerce Multilingual → Attributes.
2. WPML has stale/corrupt translation records for those attribute taxonomies.
3. The DE translation exists visually in admin but is not being used by wc_attribute_label().
This code fixes it if we use it in functions.php, but this seems like a quick hack rather than a fix of the issue:
add_filter('woocommerce_attribute_label', function($label, $name, $product) {
if (!defined('ICL_LANGUAGE_CODE') || ICL_LANGUAGE_CODE !== 'de') {
return $label;
}
$translations = [
'pa_tsvyat' => 'Farbe',
'pa_vazrast' => 'Alter',
];
return $translations[$name] ?? $label;
}, 20, 3);
Please provide a viable fix for this issue. We have a staging environment we can provide access to for you to troubleshoot.
Issue #2: As our products are downloadable, we have different files attached to each variation. These files must be different per language version. We have enabled the "different files with translations of products" mode. When we translate a product (via Advanced translation editor), we have fields to translate each downloadable file's Name, we do not have a field to input another file per language (URL address of file) - this is copied over from the primary language. So, once the translation is completed, we edit the EN/DE versions manually and the field to input a URL address of file is unlocked => we select the files we need for the secondary language versions. However, as soon as we synchronize the product again, the primary language files (not name, only file URL address!) are copied over again => we have to again manually select all other lang versions files. This is quite tedious, leaves room for a lot of error, and overall doesn't appear as a streamlined process. We do not have an option not to synchronize the translations, due to changes in the variations, etc.
We are aware and reviewed this topic: https://wpml.org/errata/downloadable-file-urls-may-be-overwritten-when-editing-translated-products-directly/, however we don't see that it specifically targets variable products (maybe for variable products in a whole other issue?) + ever since introducing and translating variable products into our website, we've been using ver 5.5.5 of the plugin stated.
Please advise how to handle this better.
Thanks in advance,
Webdesh team