Last active
February 26, 2019 16:05
-
-
Save rameshelamathi/c69d85fd2a8b371f7175f8dbe9d2a6a0 to your computer and use it in GitHub Desktop.
Delete the [Remove] Link
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
if(!function_exists('fc_woo_applied_coupons_in_cart_html')) { | |
function fc_woo_applied_coupons_in_cart_html($coupon_html, $coupon, $discount_amount_html) { | |
$discount_name = 'discount'; | |
//apply only for virtual coupons of woo discount rules | |
if(isset($coupon->code) && strtoupper($coupon->code) == strtoupper($discount_name)) { | |
$coupon_html = $discount_amount_html; | |
} | |
return $coupon_html; | |
} | |
} | |
add_filter('woocommerce_cart_totals_coupon_html', 'fc_woo_applied_coupons_in_cart_html', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment