woocommerce_blocks_pre_get_routes_from_namespace

FILTER woocommerce\src\Blocks\BlockTypes\AbstractBlock.php (ligne 478) github
Gives opportunity to return routes without invoking the compute intensive REST API.

Paramètres

Entrée :
array(
Sortie :
@param array  $routes    Array of routes.
@param string $namespace Namespace for routes.
@param string $context   Context, can be edit or view.

Utilisation

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

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

Actualités

Chargement des actualités...