Learn in this tutorial how to add a description to a WooCommerce checkout field with a simple code snippet.
In some cases, adding a description to some fields on the WooCommerce checkout page can help the user better understand what information to enter.
Thanks to the WooCommerce woocommerce_checkout_fields filter you can achieve this easily.
Here’s how to do it:
Snippet to include a description in a WooCommerce checkout field
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
In this case you use the woocommerce_checkout_fields filter and add a description to the username and password fields.

If instead of displaying the description below the field you want to display it inside the field, use this snippet instead of the previous one.
To see this and another 1097 code snippets of this website, login or subscribe here.

This is an example designed for when the person who enters the invoice data and the person who will later have access to the content are not necessarily the same, but you can adapt it to your particular needs.
Here you have all the fields of the checkout so you can add the description to the one you want.
- Billing (
[billing])billing_first_namebilling_last_namebilling_companybilling_address_1billing_address_2billing_citybilling_postcodebilling_countrybilling_statebilling_emailbilling_phone
- Shipping (
[shipping])shipping_first_nameshipping_last_nameshipping_companyshipping_address_1shipping_address_2shipping_cityshipping_postcodeshipping_countryshipping_state
- Account (
[account])account_usernameaccount_passwordaccount_password-2
- Order (
[order])order_comments
Conclusion
As you can see, with a few lines of code you can add a description to the field you want on the WooCommerce checkout page.
Any questions? Let me know in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉