Delete coupon button in cart page

Home Forums Legacy Support Support queries Other issues Delete coupon button in cart page

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #190999
    dramalanguage
    Spectator
    Hi WPLMS Happy new year Both the cart page and the checkout page have coupon input text. So I want to delete the coupon button on the cart page. https://prnt.sc/m24q1q
    #191025
    Mk
    Moderator
    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' );
    #191071
    dramalanguage
    Spectator
    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.
    #191180
    Mk
    Moderator
    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
    #191196
    dramalanguage
    Spectator
    Thank you Apply coupon hid. But, Update cart button still didn't hide. https://prnt.sc/m2vntn Please give me additional code.
    #191218
    Mk
    Moderator
    Go to wp-admin  -> Appearance  -> Customize -> Custom Css and add following css in it: .woocommerce-cart-form td.actions { display: none; }
    #202278
    dramalanguage
    Spectator
    This topic is resolved. Thank you very much.
    #202286
    Mk
    Moderator
    Great, Thanks for confirmation. I am closing this topic.
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Delete coupon button in cart page’ is closed to new replies.