Fire an action for this direct update so it can be detected by other code.
$product_id_with_stock
Sortie :
@param int $product_id_with_stock Product ID that was updated directly.
// Ajouter une fonction au hook action 'woocommerce_updated_product_stock'
add_action('woocommerce_updated_product_stock', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($product_id_with_stock) {
// Votre code ici
error_log('Hook woocommerce_updated_product_stock déclenché');
}
Chargement des actualités...