This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to upload a video to an image using the Woodmart theme on your WordPress site. Initially, the default language was Greek, but it was later switched to English. When you upload a video in the default language, it does not appear anywhere. However, when uploaded in the secondary language, it appears as expected but not in the default language. Solution: We recommend adding the following code to your functions.php file:
// WPML Workaround for compsupp-7477
add_filter('get_post_metadata', 'wpml_compsupp7477_filter_woodmart_wc_video_gallery', 10, 4);
add_filter('woodmart_single_product_image_thumbnail_id', 'wpml_compsupp7477_translate_attachment_id', 10, 2);
function wpml_compsupp7477_filter_woodmart_wc_video_gallery($null, $object_id, $meta_key, $single) {
// Target the specific meta key
if ($meta_key !== 'woodmart_wc_video_gallery') {
return $null;
}
// Prevent recursion by temporarily removing the filter
remove_filter('get_post_metadata', 'wpml_compsupp7477_filter_woodmart_wc_video_gallery', 10);
// Fetch the original meta value
$video_gallery = get_post_meta($object_id, $meta_key, false);
// Re-add the filter
add_filter('get_post_metadata', 'wpml_compsupp7477_filter_woodmart_wc_video_gallery', 10, 4);
// Check if we actually got an array
if (isset($video_gallery[0]) && is_array($video_gallery[0])) {
foreach ($video_gallery[0] as $key => $value) {
// Apply the WPML filter to each item (video settings array key)
$translated_key = apply_filters('wpml_object_id', $key, 'post', true);
$video_gallery[0][$translated_key] = $value;
}
}
return $video_gallery;
}
function wpml_compsupp7477_translate_attachment_id($attachment_id, $product) {
return apply_filters('wpml_object_id', $attachment_id, get_post_type($attachment_id), true);
}
Please ensure to backup your database before making any changes.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we 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. If further assistance is needed, please open a new support ticket at WPML support forum.
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.
Background of the issue:
I am trying to upload a video to an image using the Woodmart theme on my WordPress site hidden link. Initially, the default language was Greek, but it was later switched to English. Woodmart support suggested that the field woodmart_wc_video_gallery should be set to copy, which I did.
Symptoms:
When I upload a video in the default language, it does not appear anywhere. However, when I upload it in the secondary language, it appears as expected but not in the default language.
Questions:
Why is the video not appearing in the default language after uploading?
Could the issue be related to changing the default language from Greek to English?
Welcome to WPML support. I will answer this question before the ticket is assigned to one of my colleagues.
This behavior is tied to how Woodmart and WPML handle synchronization of custom fields during translation:
When a product is first created in English (initial default), its video gallery field (woodmart_wc_video_gallery) is saved and works correctly.
Changing the site’s default language (to Greek, in your case) breaks the linkage between the original and translated entries—so the video gallery doesn’t appear unless uploaded under the new default.
WPML requires a translation relationship between the “default-language product” and its translations for custom fields marked “Copy” to propagate correctly.
How to fix it
1. Mark woodmart_wc_video_gallery custom field as Copy
- In WPML → Settings → Custom Fields Translation, set woodmart_wc_video_gallery to Copy.
- This ensures the video URL is copied to translated versions automatically
2. Re-establish translation linkage for affected products
For each product:
- Go to the default-language product (English version).
- Make and save a minor change (e.g., change or add a title).
- Open its translation in Greek (or default language view).
- Use the WPML translation editor or manual translation screen.
- Ensure the translation record shows it is linked to the default product (not “Create new”).
- Complete the translation on save. This re-establishes the link, allowing the copied field to sync.
You need to update your WPML plugin and add-ons to the latest version, 4.7.6, to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem; however, we need to work on the latest code to troubleshoot the issue best.
You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/
If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.
Make sure to update WooCommerce plugin also to the latest version.
Remember to backup your database before you proceed.
If the issue persists after an update, please upload any relevant screenshots or links that would help illustrate the problem.
Thanks for the answer. Unfortunately the problem is not resolved. Let me clarify because I made a mistake as well.
The default language was changed from english to greek. In a woocommerce product all the product fields remain locked in greek and not english. Adding the video from english does nothing, adding it from greek adds it to greek but not to english. So it seems like changes are not passed from the default language to the translated language.
Could you please upload some screenshots showing the steps you followed and the results you’re seeing? Does the same issue occur if you create and test with a new product?
This will help me better understand the situation and provide the most accurate assistance.