Make sure we store the product type and version (to track data changes).
$product, $old_type, $new_type
Sortie :
@param WC_Product $product Product object.
// Ajouter une fonction au hook action 'woocommerce_product_type_changed'
add_action('woocommerce_product_type_changed', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($product, $old_type, $new_type) {
// Votre code ici
error_log('Hook woocommerce_product_type_changed déclenché');
}
Chargement des actualités...