woocommerce_product_duplicate_before_save

ACTION woocommerce\includes\admin\class-wc-admin-duplicate-product.php (ligne 181) github
This action can be used to modify the object further before it is created - it will be passed by reference.

Paramètres

Entrée :
$duplicate, $product
Sortie :
N/A

Utilisation

// Ajouter une fonction au hook action 'woocommerce_product_duplicate_before_save'
add_action('woocommerce_product_duplicate_before_save', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($duplicate, $product) {
    // Votre code ici
    error_log('Hook woocommerce_product_duplicate_before_save déclenché');
}

Actualités

Chargement des actualités...