Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Afficher la description d'un code promo sur la page de commande WooCommerce
<?php
/**
* Afficher la description d'un code promo
* Illustré sur http://media.mosaika.fr/mcbj
*/
function msk_display_coupon_description($value, $coupon) {
$new_value = sprintf('%1$s <small class="coupon-description">%2$s</small>', $value, $coupon->get_description());
return $new_value;
}
add_filter('woocommerce_cart_totals_coupon_label', 'msk_display_coupon_description', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.