Background of the issue:
I am trying to automate the duplication of products from Japanese to English on my site الرابط المخفي. We previously used custom code to achieve this, but after updating the WooCommerce Multilingual & Multicurrency plugin to v5.4.4, the added variables are removed each time we publish a product. Removing the custom code fixes the variables issue, but then we have to manually duplicate the product. The custom code used is: // auto duplicate products add_action( 'wp_insert_post', 'my_duplicate_on_publish' ); function my_duplicate_on_publish( $post_id ) { global $post; if (is_null($post)) { return $post_id; } if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return $post_id; } if ( isset( $post->post_type ) && $post->post_type == 'revision' ) { return $post_id; } remove_action( 'wp_insert_post', 'my_duplicate_on_publish' ); $is_translated = apply_filters( 'wpml_element_has_translations', '', $post_id, $post->post_type ); if ( !$is_translated ) { do_action( 'wpml_admin_make_post_duplicates', $post_id ); } add_action( 'wp_insert_post', 'my_duplicate_on_publish' ); }
Symptoms:
The added variables are removed each time we publish a product after updating the WooCommerce Multilingual & Multicurrency plugin to v5.4.4 with our custom code that automatically duplicated the product from Japanese to English
Questions:
Is there a setting we can adjust to automate product duplication instead of using custom code?
إدارة الموافقة على ملفات تعريف الارتباط
نستخدم ملفات تعريف الارتباط لتحسين موقعنا الإلكتروني وخدماتنا.
تسمح لنا موافقتك بمعالجة بيانات مثل سلوك التصفح.
قد يؤثر عدم الموافقة على بعض الميزات.
وظيفي
نشط دائماً
مطلوب لكي يعمل موقعنا الإلكتروني ويتواصل بشكل صحيح.
التفضيلات
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
الإحصائيات
نستخدمها لتحليل إحصائيات موقعنا.
المعلومات التي يتم جمعها مجهولة الهوية تماماً. التخزين الفني أو الوصول الذي يتم استخدامه حصريًا لأغراض إحصائية مجهولة الهوية. بدون أمر قضائي، أو الامتثال الطوعي من قبل مزود خدمة الإنترنت الخاص بك، أو سجلات إضافية من طرف ثالث، لا يمكن عادةً استخدام المعلومات المخزنة أو المسترجعة لهذا الغرض بمفردها لتحديد هويتك.
التسويق
تقوم ملفات تعريف الارتباط هذه بتتبع تصفحك لتقديم إعلانات ذات صلة بك.