woocommerce_variation_prices

FILTER woocommerce\includes\data-stores\class-wc-product-variable-data-store-cpt.php (ligne 405) github
Give plugins one last chance to filter the variation prices array which has been generated and store locally to the class. This value may differ from the transient cache. It is filtered once before storing locally.

Paramètres

Entrée :
$transient_cached_prices_array[ $price_hash ], $product, $for_display
Sortie :
N/A

Utilisation

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

function ma_fonction_filtre($transient_cached_prices_array[ $price_hash ]) {
    // Modifier la valeur
    return $transient_cached_prices_array[ $price_hash ];
}

Actualités

Chargement des actualités...