woocommerce_product_type_changed

ACTION woocommerce\includes\data-stores\class-wc-product-data-store-cpt.php (ligne 1084) github
Make sure we store the product type and version (to track data changes).

Paramètres

Entrée :
$product, $old_type, $new_type
Sortie :
@param WC_Product $product Product object.

Utilisation

// 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é');
}

Actualités

Chargement des actualités...