woocommerce_caught_exception

ACTION woocommerce\includes\wc-deprecated-functions.php (ligne 99) github
When catching an exception, this allows us to log it if unexpected.

Paramètres

Entrée :
$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.

Utilisation

// 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é');
}

Actualités

Chargement des actualités...