nevercrox.com

WooCommerce Remove Order Notes Field From Checkout

Pre-Requisites

There are no pre-requisites for this code snippet to work. Keep in mind this solution consists of two code snippets, one to display the content and one to style it.

How To Implement This Solution?

Add these two code snippets as separate entries in either your active child theme’s functions.php file or the Code Snippets plugin.

About The Snippet

Often, customers don’t need to provide additional information about their order, especially when shipping is disabled. Typically, notes fields are used to inform the store admin about preferred delivery times. However, minimizing the number of fields customers need to fill out can increase the likelihood of completing a purchase. While you could hide fields using CSS, this approach only makes them invisible without removing them. Using PHP to unset fields is a more practical solution. Here’s how to remove the heading, label, and field itself for a cleaner checkout process.

Code Snippet (Paste This Code In functions.php or Code Snippets )
/**
* Snippet Name:     Remove the Order Notes field section from the WooCommerce checkout.
* Snippet Author:   Nevercrox Solutions
*/

add_filter( 'woocommerce_enable_order_notes_field', '__return_false', 9999 );

add_filter( 'woocommerce_checkout_fields', 'nevercrox_remove_order_notes' );

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

 

Just Added Blogs

Need A Specifc Blog ?

Request A Blog

Check Out More Related Snippets