MkModerator
Go to:
Wp-admin-> Plugins-> editor
and select "wplms customizer plugin" and add following code at bottom of "wplms-customizer.php"
Code:
// 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' );
NOTE: If you want to remove coupon option from "checkout page" too then add following code only
// 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' );
// hide coupon field on checkout page
function hide_coupon_field_on_checkout( $enabled ) {
if ( is_checkout() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field_on_checkout' );
I added the below code in wplms-customizer.php.
But It still didn't fix.
https://prnt.sc/m2g5v5
---- below code ------
// hide coupon field on cart page
function hide_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
}
I just want to remove coupon option in cart page.
Please give me another code.
MkModerator
Thanks for your patience,
Your issue wasn't fix because I forgot to add filter in above code. sorry for inconvenience.
I have corrected the code above, now you can use above code.
Refer:
http://prntscr.com/m2uqr6
Thank you
Apply coupon hid. But, Update cart button still didn't hide.
https://prnt.sc/m2vntn
Please give me additional code.
MkModerator
Go to wp-admin -> Appearance -> Customize -> Custom Css
and add following css in it:
.woocommerce-cart-form td.actions {
display: none;
}
This topic is resolved.
Thank you very much.
MkModerator
Great, Thanks for confirmation. I am closing this topic.