WPML
add_action( 'wcml_before_sync_product', 'the_callback_function', 10, 2 );
Type
action
Version de WooCommerce Multilingual
3.6.3

Description

  • Exécutez des actions avant que WCML ne synchronise les produits originaux avec leurs produits traduits.
  • Cette action est appelée avant wcml_before_sync_product_data.

Arguments

Deux paramètres sont passés à cette action :
$original_product_id
(entier) L’ID du produit original.
$translated_product_id
(entier) L’ID du produit traduit.

Exemple d’utilisation

Exemple
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

Les 7 hooks de la catégorie Mise à jour du contenu →