Created
September 20, 2017 16:08
-
-
Save psaikali/3e4dbb16766dd411505ebf9ce0a13dc2 to your computer and use it in GitHub Desktop.
Afficher la description d'un code promo sur la page de commande WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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