WooCommerce: Remove Order Notes Without Writing Code
This article will explain how to remove WooCommerce order notes without writing code on your WooCommerce checkout page. No worries if you are looking for a simple code to remove order notes from WooCommerce. You can find the code snippet in the next section.
Remove Order Notes Without Writing Code
- Download our small plugin from here: Download also; you can find the source code on GitHub WooCommerce remove order notes plugin.
- Navigate to your WordPress dashboard and Plugins > Add new.
- Click on the Upload plugin button and find the downloaded plugin file (zip file) from your computer.
- Activate the plugin.
- Done. You do not have to do anything further. The plugin will handle the rest.
The plugin size is just 1KB 🚀
Need WordPress expert support?
Remove WooCommerce order notes code snippet
Just copy and paste this code snippet into the functions.php file of your child theme. If you do not have a child theme, find our make sure to create a child theme first.
/* Removes Order Notes Title - Additional Information & Notes Field */
add_filter( 'woocommerce_enable_order_notes_field', '__return_false', 9999 );
/*
* Unset order comments from the array
* @param [array] $fields
* @return [array]
*/
function wpa_remove_order_notes( $fields ) {
unset($fields['order']['order_comments']);
return $fields;
}
add_filter( 'woocommerce_checkout_fields' , 'wpa_remove_order_notes' );
The first filter, woocommerce_enable_order_notes_field, return false to disable the order note title and the related text. woocommerce_checkout_fields filter removes the input filed and the label.