ilist_pot_display_participation

Texte affiché (string) dans la colonne participation d'une liste si le prix du produit atteint ou dépasse le prix minimum fixé par l'administrateur pour ouvrir la cagnotte (participation par tranche) sous la forme prix total de la participation / prix total du produit.

Filtre disponible uniquement si l'option Cagnotte / Crowdfunding est activée.

Nom du filtre : ilist_pot_display_participation
Valeur par défaut (string) : WC price format * (Participation total) / WC price format * (Product price)
Résultat (exemple 1) : 0€ / 99€ (Si aucune participation)
Résultat (exemple 2) : 40€ / 99€ (Si participations)
Priorité : 10
Arguments : 2

* WC price format : Menu administration, WooCommerce, Réglages, Onglet Général => Options de devise

Exemple d'utilisation (hook usage) :

/**
 * Filter participation text (participation, total)
 *
 * @param 	$participation 		participation amount in progress
 * @param 	$total				total price to pay
 *
 * @return string
 */
function example_new_format( $participation, $total ) {
   return number_format($participation, 0, ".", " ") . '€ SUR '. number_format($total, 0, ".", " ") . '€';
}
add_filter( 'ilist_pot_display_participation', 'example_new_format', 10, 2 );

 

Exemple tableau

Recherche

Index