Returns the price in html format.
Renvoie le prix au format html.
$price, $this
Sortie :
@param string $deprecated Deprecated param. @return string
// Personnaliser l'affichage du prix
add_filter('woocommerce_get_price_html', 'affichage_prix_personnalise', 10, 2);
function affichage_prix_personnalise($price, $product) {
// Ajouter "À partir de" pour les produits variables
if ($product->is_type('variable')) {
$price = 'À partir de ' . $price;
}
// Ajouter une indication de TVA
if ($product->is_taxable()) {
$price .= ' TTC';
}
return $price;
}
Chargement des actualités...