Creating new custom fields for WooCommerce
Creating a New Field
In order to add new fields, go to WP-Admin > Custom Fields > Add New Field. Here, you can add new and unlimited custom fields with multiple customizing options. These fields will be displayed on the Registration, Checkout, and My Account page.
Fill out the fields to create a New Field.
1. Field Details
- Field Label: Enter the text in the “Add Title” section
- Field Type: Choose from 19 fields as listed below:
- Text
- Text area
- Select box
- Multi-select box
- Checkbox
- Multi-checkbox
- Radio button
- Number
- Password (accept secret input)
- File upload (limit file types and size)
- Color picker
- Date picker (calendar)
- Time picker
- Google ReCaptcha
- Heading
- Message
- VAT field
- Privacy text
2. Field Dependency
- Select User Roles: Select the user roles for which you want to display this field. Leave empty to display fields for all. User roles mentioned here are:
- Administrator
- Editor
- Author
- Contributor
- Subscriber
- Customer
- Shop manager
- Wholesale
- B2B
- Retailer
- Guest
- Is Field Dependable: Select from a ‘yes’ or ‘no’ option to determine if the field is dependable on another field.
- Yes: If you choose the field to be dependent, choose the field it depends on.
- Select Fields: Select fields that the created field depends on. Leave empty if dependent on none.
- No: If you choose no, the field won’t depend on another field, and you can choose from the following pages to show the field.
- Select Pages: Choose from the following pages: Registration, My Account, and Checkout.
- Yes: If you choose the field to be dependent, choose the field it depends on.
3. Field Formatting
Select from the following format settings:
- Required Field: Enable this if the field is required
- Read Only Field (Customer can not update this from My Account page): Enable this to mark the field as read-only
- Show in admin order detail page and order email: Enable this to show in the admin order detail page and order email
- Field Width: Choose from these two options: Full Width, Half-Width
- Field Placeholder Text: Add Field Placeholder Text
- Field Description: Add Field description
- Field Custom Css Class: Add Field Custom Css Class
4. Field Status
Select from the following field status settings:
- Field Sort Order: Choose the field sort order
- Field Status: Choose to keep it Active or Inactive
Click “Update” once you are done.
Viewing All Fields
Go to WP-Admin > Custom Fields > Add Fields. View all the fields and their details from this section.
- Search custom fields: Search a field you want to view
- Field type: Know the field types of all fields
- Display location: View display location
- Status: View field status
- Priority: View priority order
- Bulk Actions: Apply bulk actions to all fields: Edit, Move to trash, Active, Inactive
Managing Default Registration Fields for WooCommerce
You can also manage default registration fields by changing their titles, placeholders, and order on the registration page.
Enabling and Editing Default Fields
Go to WP-Admin > Custom Fields > Enable Default Fields.
Enable default WooCommerce registration fields on the registration page. When the user enters these fields, data will be populated on billing fields automatically.
Field Customization Options
There are 10 default fields that you can customize and publish. Below are the settings for each field that you can adjust as per your requirement:
- Label: Add a field label
- Placeholder: Add placeholder text
- Message: Add a message
- Required: Mark field is required or not.
- Sort Order: Add sort order for the field
- Field Width: Add field width
- Full width
- Half width
- Status: Choose the field status
- Publish
- Unpublish
Customize and activate as many fields as you like, and click “Save Fields” to save changes.