WooCommerce
May 26, 2020

WooCommerce Remove the Additional Information and Order Notes fields

We can remove the Additional Information and Order Notes fields in WooCommerce checkout page with 2 filters that you add to functions.php file.

Related Post


Set a specific product price conditionally on Woocommerce single product page & cart

Update 3 (Only for a defined product ID) To make it work as you want to change the simple products prices only on single product pages (without altering archives product prices, related product prices, upsells and cross-sells) if any cart item doesn’t belong to a specific product category. Then you will need all this following […]

Disable Payments on WooCommerce

You are using WooCommerce for your eCommerce website. A thing is you want to disable payment on your website, but disabling in WooCommerce payment setting WooCommerce > Settings > Payments will not work and display There are no payment methods available. Add this code to functions.php file of theme.

Get product details from $product object WooCommerce

I am publish this article for get values from WooCommerce $product object. You can get all information of product from $product object. When we have $product object. Get $product object by $product_id. Get $order object by $order_id. Get products from $cart object.

How to disable all payment methods in WooCommerce

You will have the need to disable all payment gateways on the site, but just disabling them in WooCommerce > Settings > Payments will not work because then the customers will get an error message since there are no payment methods available. We’re going to be using a different method here. The way to go […]

How Create Custom Order in Woocommerce

Paste the code where you can get the customer data Here is the function for creating the order

Enable / Disable “Ship to a Different Address” WooCommerce

To make the default “Ship to Different Address” checkbox checked in WooCommerce Checkout page, add below code on functions.php file. Disable “Ship to A Different Address” on WooCommerce Checkout, add below code on functions.php file.


8 Comments

  1. December 22, 2020

    It just works perfectly. I haven’t even needed to use the support it’s so simple and effective, so no idea if they’re any good or not on that front. I’ll just assume they’re very helpful 🙂

  2. March 9, 2021

    I have replaced code but still not working now.

  3. July 6, 2021

    Make public function like below my code.

    public function woocommerce_remove_order_notes( $fields ) {
    unset($fields['order']['order_comments']);
    return $fields;
    }

  4. March 10, 2021

    I have put your code on construct method. see below code.

    public function __construct($plugin_name, $version) {

    $this->plugin_name = $plugin_name;
    $this->version = $version;

    add_filter( 'woocommerce_checkout_fields' , 'woocommerce_remove_order_notes' );
    }

  5. July 6, 2021

    Update your this code with below code. You have to use $this object on call back function.

    public function __construct($plugin_name, $version) {

    $this->plugin_name = $plugin_name;
    $this->version = $version;

    add_filter( ‘woocommerce_checkout_fields’ , array($this, ‘woocommerce_remove_order_notes’) );
    }

  6. March 20, 2021

    I want to use this code on plugins. Where am i put this code.

  7. July 6, 2021

    On which plugin do you want to put this code? Is this your own plugin? then you have to share your plugin file.

  8. September 7, 2021

    bookmarked!!, I really like your blog!

Leave a Reply

Your email address will not be published. Required fields are marked *