You can hide it with CSS 🙂
No.
CSS wont work. I tried every which way imaginable. Unless I missed something, please provide the CSS you are referring to.
Here’s the solution… add this to your functions.php
// hide coupon field on cart page
function hide_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
}
add_filter( ‘woocommerce_coupons_enabled’, ‘hide_coupon_field_on_cart’ );
Send a link to the page and i’ll see what CSS is needed.
Hey, did you achieve something you could share to the community?!
Would be interesting..
CSS removed coupon from checkout as well.
To remove it ONLY from your cart, add this to your functions.php :
/ hide coupon field on cart page
function hide_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
}
add_filter( ‘woocommerce_coupons_enabled’, ‘hide_coupon_field_on_cart’ );
Could also just be more specific with your CSS and include the .woocommerce-cart
body class. Then the css only applies on the cart page.