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