woocommerce_blocks_product_grid_is_cacheable

FILTER woocommerce\src\Blocks\BlockTypes\AbstractProductGrid.php (ligne 355) github
Filters whether or not the product grid is cacheable.

Paramètres

Entrée :
true, $this->query_args
Sortie :
@param boolean $is_cacheable The list of script dependencies.
@param array $query_args Query args for the products query passed to BlocksWpQuery.
@return array True to enable cache, false to disable cache.

Utilisation

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

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

Actualités

Chargement des actualités...