ThemeHigh
  • Plugins
  • Bundles
  • Resources
    Documentation Documentation Step-by-step guides to set up and help you understand our plugins with ease. Blog Blog Tips, insights, and ideas from the team to help you grow your e-commerce store.
  • Resources
    Documentation
    Documentation

    Step-by-step guides to set up and help you understand our plugins with ease.

    Blog
    Blog

    Tips, insights, and ideas from the team to help you grow your e-commerce store.

  • Support
  • Login
  • Getting Started
    • Plugin Installation
    • Overview
    • Date, Time & Related Field Settings
    • Import/Export Checkout Fields
    • Managing Checkout Fields
    • Managing Checkout Section
    • Set Display Rules
    • Set Repeat Rules
    • Price Fields & Types
    • User Meta Data & Order Meta Data
    • Display Custom Fields
  • Classic and Block Checkout Editor
    • Classic and Block Checkout Editor
    • Why Your Checkout Fields Aren’...
  • Block Checkout Field Editor
    • Block Checkout Field Editor
  • Advanced Settings
    • Custom Fields in Address Format
    • Enable Address Autofill
    • Configure Locale Override Settings
    • Add Custom Fields to CSV Export
    • Display Custom Fields In PDF Invoices & Packing Slips
    • Zapier Support
    • Country, State, Province based Conditions
    • WPML Compatibility
    • Backup & Import Settings
    • Enhanced Select (Select2) for Select Fields
    • Enable Wrap Custom Sections with Div
    • Enable Heading/Label Field
    • Enable Review Panel Conditions
    • Enable Inline Validation in Chec...
    • Enable Conditional Rules Based Payment & Shipping Methods
    • WPML String Translations...
    • Add a New Custom Validation Rule
    • Add a New Confirm Field Validator
  • For Developers
    • Hooks & References...
    • Display Rules: Use cases and mor...
    • Repeat Rules: More use cases and...
    • Based on Checkout Fields: Use ca...
    • Override HTML Content: Examples...
    • Compatibility with “WooCom...
  • Compatible Plugin & Themes
    • Plugins & Themes...
  • Frequently Asked Questions
    • Frequently Asked Questions...
  • How
    • How To Display Fields In Order D...
    • How To Customise The Shipping Se...
    • How To Add Custom Fields In The ...
    • How to Add Custom Price Fields o...
    • How To Add A New Section To The ...
    • How To Display Custom Fields In ...
    • How to Show/Hide Fields Based On...
    • How To Set Repeat Rules On The C...

Documentation/Checkout Field Editor for WooCommerce/Based on Checkout Fields: Use cases and examples

Based on Checkout Fields: Use cases and examples

Last updated on October 17, 2022

Case 1: Make checkout field read only

If you are using the WooCommerce Checkout Field Editor Pro plugin, we can save additional field values as user meta. From next time, these fields are autofill with saved user data.

If you plan to disallow editing of saved user data, you can make these fields read-only after confirm that he is a logged-in user.

Use the below code snippet in your theme’s or child theme’s functions.php file. Update the string {field_name} in the filter tag in the code snippet with your field name.

function thwcfe_login_make_field_readonly($value){
// First confirm that user is already logged in
if(is_user_logged_in()){
$value = true;
}
return $value;
}
add_filter('thwcfe_is_readonly_field_{field_name}', 'thwcfe_login_make_field_readonly');

Case 2: Change the position of a description of the checkout field 

In WooCommerce Checkout Field Editor Pro, there is an option to add a description for checkout fields. The default position to display the description is below the input field.

In some cases, we need to change this position as per theme style. It may for all fields or some selected fields.

If you like to change the position of the description below label & the above input field, you can use the below code snippet.

Use the below code snippet in your theme’s or child theme’s functions.php file. Also, update your field name in the code snippet.

function thwcfe_change_position_desc($position, $key){
if($key === 'field_name'){
$position = true;
}
return $position;
}
add_filter('thwcfe_display_field_description_below_label', 'thwcfe_change_position_desc', 10, 2);
 

Case 3: Set or modify the value of a checkout field

If you like to set or modify the value of a checkout field from the checkout page, you can use below code snippet.

Use the below code snippet in your theme’s or child theme’s functions.php file. Update the string {field_name} in the filter tag in the code snippet with your field name.

function thwcfe_field_value_changer($value){
$value = 'New Value';
return $value ;
}
add_filter('thwcfe_woocommerce_form_field_value_{field_name}', 'thwcfe_field_value_changer');

Note: Using this code, you just change the value of the input field. But users always have the option to update this value of the input field.

Get the plugin

On this page

  • Case 1: Make checkout field read only
  • Case 2: Change the position of a description of the checkout field
  • Case 3: Set or modify the value of a checkout field

What's new

  • Added a custom file upload button property for the File upload field type.
  • Alert on selecting display position of sections as before/after terms and conditions.
  • Added Woocommerce 6.8.2 compatibility.

Highlights

  • 24 custom field types with file upload.
  • Create additional sections.
  • Display sections and Fields Conditionally.
  • Display custom fields at 14 different positions.
  • Create confirm field validators.
  • Price fields with a set of price types.
  • Repeat fields and sections based on specific conditions.
  • WPML Compatibility.
  • Import & Export fields and sections.

This article posted in Checkout Field Editor for WooCommerce, For Developers, Pro Documentation

Leave a Reply Cancel reply

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

ThemeHigh

Driven by a deep passion for crafting thoughtful solutions, we aim to make WooCommerce store customization an easy and enjoyable experience for our users.

© 2026 ThemeHigh. All rights reserved.

Terms and conditions, features, support, pricing, and service options subject to change without notice.