Quote from Alex Dovlatov on March 23, 2026, 12:29
Hello
Do you also have the WCML (WooCommerce Multilingual) plugin installed alongside WPML?
The possible reason is that BEAR updates the weight directly via WooCommerce API, which may bypass WPML's sync mechanism — so the translated products don't get notified about the change. This is just a guess for now, your answer will help narrow it down.
Try please next script to place into file functions.php of the current wp theme:
add_action('woobe_after_update_page_field', function($field_key, $product_id) {
$sync_fields = ['weight', 'length', 'width', 'height'];
if (!in_array($field_key, $sync_fields)) {
return;
}
if (!function_exists('icl_object_id') || !function_exists('icl_get_languages')) {
return;
}
$product = wc_get_product($product_id);
if (!$product) {
return;
}
$value = $product->{"get_$field_key"}('edit');
$icl_langs = icl_get_languages();
foreach ($icl_langs as $ln => $data) {
$translated_id = icl_object_id($product_id, 'post', false, $ln);
if (!$translated_id || $translated_id === $product_id) {
continue;
}
$translated_product = wc_get_product($translated_id);
if ($translated_product) {
$translated_product->{"set_$field_key"}($value);
$translated_product->save();
}
}
}, 10, 2);
Hello
Do you also have the WCML (WooCommerce Multilingual) plugin installed alongside WPML?
The possible reason is that BEAR updates the weight directly via WooCommerce API, which may bypass WPML's sync mechanism — so the translated products don't get notified about the change. This is just a guess for now, your answer will help narrow it down.
Try please next script to place into file functions.php of the current wp theme:
add_action('woobe_after_update_page_field', function($field_key, $product_id) {
$sync_fields = ['weight', 'length', 'width', 'height'];
if (!in_array($field_key, $sync_fields)) {
return;
}
if (!function_exists('icl_object_id') || !function_exists('icl_get_languages')) {
return;
}
$product = wc_get_product($product_id);
if (!$product) {
return;
}
$value = $product->{"get_$field_key"}('edit');
$icl_langs = icl_get_languages();
foreach ($icl_langs as $ln => $data) {
$translated_id = icl_object_id($product_id, 'post', false, $ln);
if (!$translated_id || $translated_id === $product_id) {
continue;
}
$translated_product = wc_get_product($translated_id);
if ($translated_product) {
$translated_product->{"set_$field_key"}($value);
$translated_product->save();
}
}
}, 10, 2);