When catching an exception, this allows us to log it if unexpected.
$exception_object, $function, $args
Sortie :
@param Exception $exception_object The exception object. @param string $function The function which threw exception. @param array $args The args passed to the function.
// Ajouter une fonction au hook action 'woocommerce_caught_exception'
add_action('woocommerce_caught_exception', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($exception_object, $function, $args) {
// Votre code ici
error_log('Hook woocommerce_caught_exception déclenché');
}
Chargement des actualités...