wc_object_cache_get_engine

FILTER woocommerce\src\Caching\ObjectCache.php (ligne 107) github
Filters the underlying cache engine to be used by an instance of ObjectCache.

Paramètres

Entrée :
$engine, $this
Sortie :
@param CacheEngine $engine The cache engine to be used by default.
@param ObjectCache $cache_instance The instance of ObjectCache that will use the cache engine.
@returns CacheEngine The actual cache engine that will be used.

Utilisation

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

function ma_fonction_filtre($engine) {
    // Modifier la valeur
    return $engine;
}

Actualités

Chargement des actualités...