Hide coupon column at checkout - by vincentdv

This topic has 6 replies, 3 voices, and was last updated 2 years, 11 months ago ago by Olga Barlow

  • Avatar: vincentdv
    vincentdv
    Participant
    May 9, 2021 at 18:29

    Good day.

    May I know how do I hide the coupon column at checkout page?

    I would like to prevent customer from keyin coupon manually.
    Thank you.

    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 10, 2021 at 07:32

    Hello,

    Add the next code in functions.php of your child theme via FTP:

    function disable_coupon_field_on_checkout( $enabled ) {
    	if ( is_checkout() ) {
    		$enabled = false;
    	}
    	return $enabled;
    }
    add_filter( 'woocommerce_coupons_enabled', 'disable_coupon_field_on_checkout' );

    Regards

    Avatar: vincentdv
    vincentdv
    Participant
    May 17, 2021 at 15:31

    .woocommerce-checkout .woocommerce-info {
    display: none;
    }

    I checked previous history and found this, it works for me.

    Do they function the same way?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 17, 2021 at 17:44

    Hello,

    Custom CSS that you provided will hide all the WooCommerce notifications on the checkout page (not just coupon code).

    Did you try to add PHP code that Rose suggested to child theme functions.php? Did not it work for you that you decided to use CSS?

    Regards

    Avatar: vincentdv
    vincentdv
    Participant
    May 18, 2021 at 09:23

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 18, 2021 at 14:11

    Hello,

    Sorry, I don’t understand your answer. So, did you try Rose’s code?

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.