woocommerce_logging_class

FILTER woocommerce\includes\wc-core-functions.php (ligne 2125) github
Get a shared logger instance. Use the woocommerce_logging_class filter to change the logging class. You may provide one of the following:     - a class name which will be instantiated as `new $class` with no arguments     - an instance which will be used directly as the logger In either case, the class or instance *must* implement WC_Logger_Interface.

Paramètres

Entrée :
'WC_Logger'
Sortie :
@return WC_Logger_Interface

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_logging_class'
add_filter('woocommerce_logging_class', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre('WC_Logger') {
    // Modifier la valeur
    return 'WC_Logger';
}

Actualités

Chargement des actualités...