How To Create Custom Checkout Fields with WooCommerce

- written by

As you build sites for different clients, various needs come up. Some can be done by customizations, others with a plugin. When it comes to checkout handing over a site with options built in that allows your client to take advantage of is never a bad idea. One of those types of extensions is the Conditional Checkout Fields.

Conditional Checkout Fields Plugin for WooCommerce

With this plugin, you can create unlimited custom conditional fields, which will only display based on what products are in the cart. You can even control it by quantity. This works well because you can add custom fields to the checkout without overwhelming the customers with options they don’t want or need.

Global Settings

You can set global settings for the location of the field as well as custom text above and below that field.

global settings

Creating a Conditional Checkout Field

This is where it all happens. You have a lot of control in setting when these fields pop up.

A few things to note here. The Before and After Field text can be customized per custom field to override the settings I showed you above.

You can create the condition based on three important elements.

  1. The minimum quantity that has be in the customer’s cart before it will show.
  2. The product you want this specific custom field to show once that product is in the cart.
  3. Categories to also control when the field is shown, based on products assigned to the category.

And of course several other parameters which you will set.

custom checkout field settings for conditional

You have a variety of input fields to choose from when creating this custom checkout field.

input fields for custom checkout

Examples of Custom Checkout Fields

In this first example, I have added a space, so if someone chooses the Metal Engraving, they have a text area to add the engraving.

metal engraving setup

If we look at the checkout with some other item added, we don’t see this option.

checkout without metal engraving

But if we add it to the cart, now it’s visible.

checkout with metal graving

In the next example, I am going to use a service instead of a product. This is a WordPress retainer for coaching and training. I will send them a longer form to fill out later with information I need, but in order for me to send them to the right form, I need to know if they have an existing site or  they need help with a new site build. So I add the option as a dropdown menu to let me know when they order.

retainer setup

And it would obviously not show this field until I add the retainer to my cart, but you can see it is included at checkout.

retainer option at checkout

For the last example, let’s look at something around quantity. Let’s say that when someone orders more than 10 of any t-shirt, there is a checkbox that they need to agree to, that orders take up to 30 days to ship. The setup would look like this and instead of a product choice, I have used the category t-shirts.

setup for quanitity

If we order only 5 t-shirts, we don’t see the message.

checkout with less than 10 tshirts

If we order 10 or more:

checkout with more than 10 tshirts

Overriding Default Fields

You can also customize the default fields at checkout.

override default fields

If you edit any of these, you will get similar options when creating conditional checkout fields, including options for the field type.

override the default settings

Exporting Order Options

You can also export the options to a CVS file.

export orders

As with any WooCommerce plugin or extension that comes with conditional logic, this one provides you with some flexible options that can help you provide information to customers at checkout. You can get yourself a copy or learn more about the Conditional Checkout Fields plugin for WooCommerce here.

Only the posts on the builder blog here may include affiliate links. If you click on them and make a purchase, I'll get a commission, at no cost to you.