Skip to content

Instantly share code, notes, and snippets.

@rameshelamathi
Last active February 26, 2019 16:05
Show Gist options
  • Save rameshelamathi/c69d85fd2a8b371f7175f8dbe9d2a6a0 to your computer and use it in GitHub Desktop.
Save rameshelamathi/c69d85fd2a8b371f7175f8dbe9d2a6a0 to your computer and use it in GitHub Desktop.
Delete the [Remove] Link
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