we are using WPML together with WooCommerce and we are experiencing an issue with variable product translations.
Issue description:
After creating a translation of a variable product, the images assigned to individual variations in the original language are not copied to the translated product.
The variations themselves exist, but in the variation table of the translated product no images are assigned.
What we have already checked:
WPML → Media: media duplication and featured image duplication options are enabled
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi,
After re-enabling the option "Automatically detect best options for translating image texts (alt, caption, title)" on the WPML > Settings page and completing the Media Translation setup, I see the variation images are displayed correctly in the frontend. Please check the attached screenshot. Can you please confirm it work on your end?
Regarding the issue with the display of variation images in the admin area, I'm still investigating this.
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi,
There are 2 workarounds to display the variation images in the admin area. Please check them below.
1.
- Go to WPML > Settings > Scroll down and disable the option "Automatically detect best options for translating image texts"
- Click on Setup Manually
- Enable options in the column "Existing content"
- Click on Start Process and wait for the process completed
- Re-enable option "Automatically detect best options for translating image texts"
2.
- Edit the file wp-content/plugins/woocommerce-multilingual/classes/media/Wrapper/Translatable.php
- Around line 288, change the code from
// fallback to global setting.
to
// fallback to global setting.
if ( \WPML\Media\Option::shouldHandleMediaAuto() ) {
return true;
}
then you can edit the product in the original language, just click on Update without any changes to sync the variation images to the translation.
❌ IMPORTANT: Please backup your database and website before proceeding ❌
However, I think it isn't necessary because the variation images are displayed in the frontend when you view the translation product.
Looking forward to your reply.
Thanks
The topic ‘[Closed] WPML + WooCommerce – variation images not synced to translated products’ is closed to new replies.