How to create woocommerce purchase note

woocommerce purchase note is messages that customers send to the store when purchasing. The messages could be notes of address, or reminders to remind admin the date of goods delivery. This article will help you understand what purchase note on woocommerce is as well as how it works, where the data display, and how to eliminate it when unnecessary.

woocommerce purchase note

Display purchase note

In order to see the note contents from customers, you get to Order of Woocommerce. When getting to each order, you will see the content as the figure below

woocommerce purchase note

Change the purchase note placeholder

You can replace the default placeholder of Woocommerce purchase note with the syntax of the following command. You should remember that it only works when being added to function.phpin the theme folder file.

add_filter( 'woocommerce_checkout_fields', 'ht_woocommerce_checkout_fields' );
* Change Order Notes Placeholder Text - WooCommerce
functionht_woocommerce_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Your custom placeholder';
return $fields;

Now, the checkout page in the front end will display like that

woocommerce purchase note

Remove woocommerce purchase note

woocommerce purchase note is seen not to be a required field. You can enter it or not. Therefore, there are two ways of hiding this field

The first way is using css to hide it.

.woocommerce-additional-fields {display:none}

You add this code to css. file. Press F5 button to check.

woocommerce purchase note


The second way is safer. If you accidentally add a field with the same class as the class in the figure above, this field will be hidden by chance. Therefore, you should add it to function.php file, then add the below code

add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );

After the article Woocommerce purchase note, you must have known to use it properly depending on the project that you are developing requires purchase note or not. I have worked on many projects so I see that there are many custom requirements in orders. For instance, customers want to add/delete a field, change the order of data displayed, and retrieve users’ data to deliver to the back end for the admin to check. If you are using woocommerce, you should read our next articles. We will have more articles about customer checkout page as well as order. But if you are using Prestashop, I suggest that you should use Order edit module. Because this module helps arrange, edit, and add new orders easily.


Leave a Reply

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