woocommerce_get_variation_prices_hash

FILTER woocommerce\includes\data-stores\class-wc-product-variable-data-store-cpt.php (ligne 445) github
Create unique cache key based on the tax location (affects displayed/cached prices), product version and active price filters. DEVELOPERS should filter this hash if offering conditional pricing to keep it unique.

Paramètres

Entrée :
$price_hash, $product, $for_display
Sortie :
@param WC_Product $product Product object.
@param bool       $for_display If taxes should be calculated or not.
@return string

Utilisation

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

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

Actualités

Chargement des actualités...