add_action( 'wcml_before_sync_product', 'the_callback_function', 10, 2 );
- סוג
- action
- קטגוריה
- עדכון תוכן
- גרסת WooCommerce Multilingual
- 3.6.3
תיאור
- הפעל פעולות לפני ש־WCML מסנכרן מוצרים מקוריים למוצרים המתורגמים שלהם.
- פעולה זו נקראת לפני wcml_before_sync_product_data.
ארגומנטים
שני פרמטרים מועברים לפעולה זו:- $original_product_id
- (מספר שלם) המזהה (ID) של המוצר המקורי.
- $translated_product_id
- (מספר שלם) המזהה (ID) של המוצר המתורגם.
דוגמה לשימוש
דוגמה
add_action( 'wcml_before_sync_product', 'my_custom_action', 10, 2 );
function my_custom_action( $original_product_id, $translated_product_id ) {
// 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_data