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