add_action( 'wcml_before_sync_product_data', 'the_callback_function', 10, 3 );
- النوع
- action
- الفئة
- تحديث المحتوى
- إصدار WooCommerce Multilingual
- 3.7.0
الوصف
- شغّل الإجراءات قبل أن يزامن WCML البيانات (الصور، التصنيفات، المتغيرات، إلخ) من المنتجات الأصلية إلى ترجماتها.
- يُستدعى هذا الإجراء بعد wcml_before_sync_product.
الوسطاء
تُمرَّر ثلاثة وسائط إلى هذا الإجراء:- $original_product_id
- (integer) معرف المنتج الأصلي.
- $translated_product_id
- (integer) معرف المنتج المترجم.
- $target_language
- (string) رمز لغة المنتج المترجم.
مثال على الاستخدام
مثال
add_action( 'wcml_before_sync_product_data', 'my_custom_action', 10, 3 );
function my_custom_action( $original_product_id, $translated_product_id, $target_language ) {
// my custom action
}
خطاطيف ذات صلة
wcml_after_duplicate_product_post_meta, wcml_update_extra_fields, wcml_js_lock_fields_ids, wcml_js_lock_fields_input_names, wcml_js_lock_fields_classes, wcml_before_sync_product