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