Hide Order comments at checkout? - by Annh

This topic has 4 replies, 2 voices, and was last updated 6 years, 2 months ago ago by Rose Tyler

  • Avatar: Annh
    Annh
    Participant
    September 7, 2018 at 08:44

    Hi, easy way to ermove order comments at checkout? Added

    // remove Order Notes from checkout field in Woocommerce
    add_filter( ‘woocommerce_checkout_fields’ , ‘alter_woocommerce_checkout_fields’ );
    function alter_woocommerce_checkout_fields( $fields ) {
    unset($fields[‘order’][‘order_comments’]);
    return $fields;
    }

    But it still shows… Any better solution?

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 7, 2018 at 08:51

    Hello,

    Did you add the code in functions.php file of your child theme that is activated ou your site?
    You may try to add this code in Theme Option > Custom css:

    #order_comments_field {
      display: none;
    }

    Let me know the result.

    Regards

    Avatar: Annh
    Annh
    Participant
    September 7, 2018 at 10:17

    Solved! When you code was added to Apperance > Customise > Extra CSS it did work.

    (FYI: I added the code into a custom PHP plugin, so not to mess with the original PHP. But apparently that did not work. Also -adding your CSS to Theme Options > Custom CSS > Global Custom CSS did not work, only into the Extra CSS field… Strange. )

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 7, 2018 at 10:26

    Hello,

    I am glad that your problem was solved.
    Feel free to ask if you have any other questions.

    Regards

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

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

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