add_action( 'wcml_update_extra_fields', 'the_callback_function', 10, 4 );
- Type
- action
- Catégorie
- Mise à jour du contenu
- Version de WooCommerce Multilingual
- 3.5
Description
Exécutez vos fonctions personnalisées juste après la mise à jour des champs de produit traduits.
Arguments
Quatre paramètres sont transmis à cette action :- $original_product_id
- (entier) L’ID du produit d’origine.
- $translated_product_id
- (entier) L’ID du produit traduit.
- $translation_data
- (tableau) Les données du produit traduit.
- $target_language
- (chaîne de texte) Le code de langue du produit traduit.
Exemple d’utilisation
Exemple
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
}
Hooks associés
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