Filter hooks

thwcfe_force_enqueue_checkout_public_scripts

apply_filters('thwcfe_force_enqueue_checkout_public_scripts', false);
Enque checkout field editor’s javascript & css files in other public pages.

Parameters

Boolean value

Usage

add_filter('thwcfe_force_enqueue_checkout_public_scripts', '__return_true');

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_debug_mode

apply_filters('thwcfe_debug_mode', false);
Load unminified javascript & CSS files in front end for debugging.

Parameters

Boolean value

Usage

add_filter(‘thwcfe_debug_mode’, ‘__return_true’);

Default value

false

Location

public/class-thwcfe-public-checkout.php
apply_filters('thwcfe_enqueue_script_in_footer', true);
Load javascript files in in footer.

Parameters

Boolean value

Usage

add_filter('thwcfe_debug_mode', '__return_false');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_include_jquery_ui_i18n

apply_filters( 'thwcfe_include_jquery_ui_i18n', TRUE );
Load jQuery UI i18n file for translation of jQuery UI elements.

Parameters

Boolean value

Usage

add_filter('thwcfe_include_jquery_ui_i18n', '__return_false');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_select2_i18n_languages

apply_filters('thwcfe_select2_i18n_languages', false);
Load languages files for select default messages & warning.

Parameters

empty array

Usage

add_filter('thwcfe_select2_i18n_languages', $languages_array);

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_force_register_date_picker_script

apply_filters('thwcfe_force_register_date_picker_script', false);
In default, WooCommerce will register data picker script in checkout page. If script is not loaded, use this filter to forcefully enque jQuery UI data picker script in checkout page.

Parameters

Boolean value

Usage

add_filter('thwcfe_force_register_date_picker_script', '__return_true');

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_date_picker_field_readonly

apply_filters('thwcfe_date_picker_field_readonly', true);
In default, the date picker field is read-only. That means no option to enter date field manually. To enable manually entering value, use this filter & return false.

Parameters

Boolean value

Usage

add_filter('thwcfe_date_picker_field_readonly', '__return_false');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_date_picker_notranslate

apply_filters('thwcfe_date_picker_notranslate', true);
In default, date picker fields are not translatable. If translation required for these fields, use this filter & return false.

Parameters

Boolean value

Usage

add_filter('thwcfe_date_picker_notranslate', '__return_false');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_time_picker_restrict_slots_for_same_day (???)

apply_filters( 'thwcfe_time_picker_restrict_slots_for_same_day', true);
Disable all time slot before current time in current day in time picker field

Parameters

Boolean value

Usage

add_filter('thwcfe_time_picker_restrict_slots_for_same_day', '__return_false');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_enable_conditions_based_on_review_panel_fields - DPR

apply_filters( 'thwcfe_enable_conditions_based_on_review_panel_fields', $enable_conditions_payment_shipping);
Enable conditional rules based on country, payment, shipping or review panel. Option already avialble in backend settings.

Parameters

Boolean value

Usage

add_filter('thwcfe_enable_conditions_based_on_review_panel_fields', '__return_true');

Default value

Based on value in advance settings.

Location

public/class-thwcfe-public-checkout.php

thwcfe_change_event_disabled_fields (????)

field names of disabled fields (examples - conditionally hide & show fields) that don’t have a change event. Return comma separated field names.
apply_filters('thwcfe_change_event_disabled_fields', '');

Parameters

String (Comma seperated field names)

Usage

add_filter('thwcfe_change_event_disabled_fields', 'change_event_disabled_fields');

function change_event_disabled_fields(){
	return 'field_name_1,field_name_2';
}

Default value

Empty string

Location

public/class-thwcfe-public-checkout.php

thwcfd_woocommerce_checkout_fields_hook_priority

apply_filters('thwcfd_woocommerce_checkout_fields_hook_priority', 1000);
Set proirity of filter hook used to add new checkout fields

Parameters

Integer value

Usage

add_filter('thwcfd_woocommerce_checkout_fields_hook_priority', 'th_34hf_function');

function th_34hf_function(){
	return 9999;
}

Default value

1000

Location

public/class-thwcfe-public-checkout.php

thwcfe_override_country_locale

apply_filters('thwcfe_override_country_locale', true);
In default, checkout field editor plugin override country related rules (exmple - ZIP code & state are required etc). If this override is not required, use filter & return false.

Parameters

Boolean value

Usage

add_filter('thwcfe_override_country_locale', '__return_false');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_cart_product_categories

apply_filters('thwcfe_cart_product_categories', array_values($cart['categories']);
There is an option to show or hide fields based on conditions like cart items is in a specific category. To do so, Checkout field editor plugin creates a category list of cart items. To override this category list, use this filter & return a new list of category in an array format.

Parameters

Array (array of categories slug)

Usage

add_filter(‘thwcfe_cart_product_categories’, ‘override_cart_category’ , 10, 1); function override_cart_category($categories){
// Remove an array element by search & find array key of slug
if (($key = array_search('category-slug', $categories)) !== false) {
	unset($categories[$key]);
}

// Add new category
array_push($categories, "another-category-slug");

return $categories; }

Default value

Current cart items category in array format

Location

includes/utils/class-thwcfe-utils.php

thwcfe_ignore_wpml_translation_for_product_category

apply_filters('thwcfe_ignore_wpml_translation_for_product_category', true);
Ignore product category translation for conditional fields.

Parameters

Boolean value

Usage

add_filter('thwcfe_ignore_wpml_translation_for_product_category', '__return_true');

Default value

true

Location

public/class-thwcfe-public-checkout.php

thwcfe_use_default_fields_if_empty(internal pourpose only)

If shipping and billing fields are empty, use default billing and shipping fields.
apply_filters('thwcfe_use_default_fields_if_empty', false, $section_name);
Parameters
  1. Boolean
  2. $section_name - section name (‘billing’ or ‘shipping’)

Usage

add_filter('thwcfe_use_default_fields_if_empty', 'th_3df5func', 10, 2);

function th_3df5func($value, $section_name){
	if($section_name == 'billing'){
		$value = true;
	}
	
	return $value;
}

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_ignore_address_field_changes (** - need to change hook name)

apply_filters('thwcfe_ignore_address_field_changes', false));
If checkout fields are overridden by Checkout field editor plugin, ignore these changes in my account pages and only effect in checkout fields.

Parameters

Boolean value

Usage

add_filter('thwcfe_ignore_address_field_changes', '__return_true');

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_skip_default_address_fields_override

apply_filters('thwcfe_skip_default_address_fields_override', false);
Disable overriding of defaul address fields (country, zip, address 1, address 2).

Parameters

Boolean value

Usage

add_filter('thwcfe_skip_default_address_fields_override', '__return_true');

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_address_field_override_with *******?????

apply_filters('thwcfe_address_field_override_with', 'billing');
If the default address fields override is disabled, default address fields are fields in billing section. Developer can switch the section name using this filter.

Parameters

String

Usage

add_filter('thwcfe_address_field_override_with', 'address_field_override_with_shipping', 10, 1);
function address_field_override_with_shipping($section){
	$section = 'shipping';
	return $section;
}

Default value

‘billing’

Location

public/class-thwcfe-public-checkout.php

thwcfe_address_field_override_placeholder

apply_filters('thwcfe_address_field_override_placeholder', true, $country);
If there is a placeholder in WooCommerce country locale for a country, disable checkout field editor plugin override of that placeholder.

Parameters

  1. Boolean value
  2. $country

Usage

add_filter(‘thwcfe_address_field_override_placeholder’, ‘disable_address_field_override_placeholder’ , 10, 2); function disable_address_field_override_placeholder($value, $country){
if($country == 'US'){
	$value = false;
}

return $value; }

Default value

True

Location

public/class-thwcfe-public-checkout.php

thwcfe_address_field_override_label

apply_filters('thwcfe_address_field_override_label', true, $country);
If there is a label in WooCommerce country locale for a country, disable checkout field editor plugin override of that label.

Parameters

  1. Boolean value
  2. $country

Usage

add_filter('thwcfe_address_field_override_label', 'disable_address_field_override_label' , 10, 2);

function disable_address_field_override_label($value, $country){
	
	if($country == 'US'){
		$value = false;
	}
	
	return $value;
}

Default value

True

Location

public/class-thwcfe-public-checkout.php

thwcfe_address_field_override_required

apply_filters('thwcfe_address_field_override_required', false, $country);
If there is a required parameter for a field in WooCommerce country locale for a country, disable checkout field editor plugin override of that required parameter.

Parameters

  1. Boolean value
  2. $country

Usage

add_filter('thwcfe_address_field_override_required', 'disable_address_field_override_required' , 10, 2);

function disable_address_field_override_required($value, $country){
	
	if($country == 'US'){
		$value = true;
	}
	
	return $value;
}

Default value

False

Location

public/class-thwcfe-public-checkout.php

thwcfe_address_field_override_priority

apply_filters('thwcfe_address_field_override_priority', true, $country);
If there is a priority parameter for a field in WooCommerce country locale for a country, disable checkout field editor plugin override of that priority parameter.

Parameters

  1. Boolean value
  2. $country

Usage

add_filter('thwcfe_address_field_override_priority', 'disable_address_field_override_priority' , 10, 2);

function disable_address_field_override_priority($value, $country){
	
	if($country == 'US'){
		$value = false;
	}
	
	return $value;
}

Default value

True

Location

public/class-thwcfe-public-checkout.php

thwcfe_custom_section_positions

apply_filters('thwcfe_custom_section_positions', array());
Add custom hooks (created by multistep checkout plugin or any other plugin that add a hook in checkout page) to checkout page.

Parameters

array

Usage

add_filter('thwcfe_custom_section_positions', 'thwcfe_custom_section_positions');
function thwcfe_custom_section_positions($custom){
	$custom = array(
		'hook_name' => 'title';
	);

	return $custom;
}

Default value

Empty array

Location

public/class-thwcfe-public-checkout.php

thwcfe_disabled_hooks

apply_filters('thwcfe_disabled_hooks', $dis_hooks);
Filter the disabled hooks by checkout field editor plugin.

Parameters

Array (array of disabled hooks)

Usage

add_filter('thwcfe_disabled_hooks', 'th_modify_disabled_hooks', 10, 1);

function th_modify_disabled_hooks($hooks){

	return $hooks;
}

Default value

An array of disabled hook as per different conditions.

Location

public/class-thwcfe-public-checkout.php

thwcfe_disabled_sections

apply_filters('thwcfe_disabled_sections', $dis_sections);
Get the disabled sections

Parameters

Array

Usage

add_filter('thwcfe_disabled_sections', 'thwcfe_remove_disabled_sections');
function thwcfe_remove_disabled_sections($sections){
	$sections[] = 'section_name';

	return $sections;
}

Default value

Empty array

Location

public/class-thwcfe-public-checkout.php

thwcfe_disabled_fields

apply_filters('thwcfe_disabled_fields', $dis_fields);
Get the disabled fields

Parameters

Array

Usage

add_filter('thwcfe_disabled_fields', 'thwcfe_remove_disabled_fields');
function thwcfe_remove_disabled_fields($fields){
	$fields[] = 'field_name';

	return $fields;
}

Default value

Empty Array

Location

public/class-thwcfe-public-checkout.php

thwcfe_woocommerce_checkout_user_meta_posted_value_$key

apply_filters( 'thwcfe_woocommerce_checkout_user_meta_posted_value_'.$key, $value, $customer_id, $posted );
If field value is saved as user meta, override submitted data of field before saving as user meta

Parameters

$value - string $customer_id - integer $posted - Array

Usage

add_filter('thwcfe_woocommerce_checkout_user_meta_posted_value_field_name', 'thwcfe_change_submited_value_of_field', 10, 3);

function thwcfe_change_submited_value_of_field($value, $customer_id, $posted){
	$value = 'changed value';
	return $value;
}

Default value

$posted - Checkout data

Location

public/class-thwcfe-public-checkout.php

thwcfe_woocommerce_checkout_order_meta_posted_value_$key

apply_filters( 'thwcfe_woocommerce_checkout_order_meta_posted_value_'.$key, $value, $order_id, $posted );
Override submitted data of field before saving as order meta

Parameters

$value - string $order_id - integer $posted - array

Usage

add_filter('thwcfe_woocommerce_checkout_order_meta_posted_value_field_name', 'thwcfe_change_submited_order_value_of_field', 10, 3);

function thwcfe_change_submited_order_value_of_field($value, $order_id, $posted){
	$value = 'changed value';

	return $value;
}

Default value

$posted - Checkout data

Location

public/class-thwcfe-public-checkout.php

thwcfe_force_wp_session

apply_filters('thwcfe_force_wp_session', false);
Use PHP session instead of WooCommerce session

Parameters

Boolean value

Usage

add_filter('thwcfe_force_wp_session', '__return_true');

Default value

False

Location

public/class-thwcfe-public-checkout.php

thwcfe_force_start_session

apply_filters('thwcfe_force_start_session', false);
If PHP session is using, trigger session_start.

Parameters

Boolean value

Usage

add_filter('thwcfe_force_wp_session', '__return_true');

Default value

False

Location

public/class-thwcfe-public-checkout.php

thwcfe_checkout_field_extra_price_$name

apply_filters('thwcfe_checkout_field_extra_price_'.$name, $price, $value);
Override additional price for checkout field.

Parameters

$price - Float number
$value - string

Usage

add_filter('thwcfe_checkout_field_extra_price_field_name', 'thwcfe_change_value_of_price_field', 10, 2);
function thwcfe_change_value_of_price_field($price, $value){
	$price = 20; // New Price

	return $price;
}

Default value

Field price

Location

public/class-thwcfe-public-checkout.php

thwcfe_dynamic_price_quantity (???????)

apply_filters('thwcfe_dynamic_price_quantity', $qty, $name);
If field price is dynamic, filter the price quantity.

Parameters

$qty - Integer
$name - String

Usage

add_filter('thwcfe_dynamic_price_quantity', 'thwcfe_change_quantity_added_in_field', 10, 2);
function thwcfe_change_quantity_added_in_field($qty, $name){
	if($name == 'test_field'){
		$qty = 2;
	}

	return $qty;
}

Default value

false

Location

public/class-thwcfe-public-checkout.php

thwcfe_checkout_field_extra_cost_$name

apply_filters('thwcfe_checkout_field_extra_cost_'.$name, $fprice, $value);
Modify price of checkout field

Parameters

$fprice = Integer or float $value = string

Usage

add_filter('thwcfe_checkout_field_extra_cost_your_field_name', 'th_modify_checkout_field_extra_cost', 10, 2);

function th_modify_checkout_field_extra_cost($field_price, $field_value){
	
	return $field_price;
}

Default value

Field price

Location

public/class-thwcfe-public-checkout.php

thwcfe_show_tax_label_in_cart_totals_fee_html

apply_filters('thwcfe_show_tax_label_in_cart_totals_fee_html', true);
Show / hide the tax label of checkout fees added by checkout field editor field with price.

Parameters

Boolean value

Usage

add_filter('thwcfe_show_tax_label_in_cart_totals_fee_html', '__return_false');

Default value

True

Location

public/class-thwcfe-public-checkout.php

thwcfe_country_hidden_field_override_default_value (???????)

apply_filters('thwcfe_country_hidden_field_override_default_value', false, $key, $value)

Parameters

Usage

Default value

Location

public/class-thwcfe-public-checkout.php

thwcfe_nl2br_custom_field_value ????????

apply_filters('thwcfe_nl2br_custom_field_value', true);

Parameters

Usage

Default value

Location

public/class-thwcfe-public-checkout.php

thwcfe_esc_attr_custom_field_label_thankyou_page

apply_filters('thwcfe_esc_attr_custom_field_label_thankyou_page', false)
Escape HTML attribute of field label in thank you page.

Parameters

Boolean

Usage

apply_filters(‘thwcfe_esc_attr_custom_field_label_thankyou_page’, ‘__return_true’);

Default value

False

Location

public/class-thwcfe-public-checkout.php

thwcfe_clickable_filename_in_order_view

apply_filters('thwcfe_clickable_filename_in_order_view', true, $key);
Uploaded file wiil be clicable in thank you page as link. To show it as text, use this filter & return false.

Parameters

$key - field name

Usage

add_filter('thwcfe_clickable_filename_in_order_view', '__return_false');

Default value

True

Location

public/class-thwcfe-public-checkout.php

thwcfe_align_field_value_in_separate_lines

apply_filters('thwcfe_align_field_value_in_separate_lines', false);
Show multi select and checkbox group options in separate line in thank you page & order detail pages.

Parameters

Boolean

Usage

add_filter('thwcfe_align_field_value_in_separate_lines', '__return_true');

Default value

False

Location

public/class-thwcfe-public-checkout.php

thwcfe_view_order_customer_details_table_view

apply_filters( 'thwcfe_view_order_customer_details_table_view', true );
Show the items added as table view in the thank you page. To show in dt dd tags, use this filter & return false.

Parameters

Boolean

Usage

add_filter('thwcfe_view_order_customer_details_table_view', '__return_false');

Default value

True

Location

public/class-thwcfe-public-checkout.php

thwcfe_myaccount_address_fields_hook_priority

apply_filters('thwcfe_myaccount_address_fields_hook_priority', 1100);
Set filter hook priority to add address field created by checkout field editor plugin.

Parameters

Integer value

Usage

add_filter('thwcfe_myaccount_address_fields_hook_priority', 'myaccount_address_fields_hook_priority');
function myaccount_address_fields_hook_priority($priority){

	return $priority;	
}

Default value

1100

Location

public/class-thwcfe-public-myaccount.php

thwcfe_myaccount_display_hidden_field_as_text_field

apply_filters('thwcfe_myaccount_display_hidden_field_as_text_field', false);
Display hidden field as text field in my account page

Parameters

Boolean

Usage

add_filter('thwcfe_myaccount_display_hidden_field_as_text_field', '__return_true');

Default value

false

Location

public/class-thwcfe-public-myaccount.php

thwcfe_ignore_custom_fields_in_address_to_edit

apply_filters('thwcfe_ignore_custom_fields_in_address_to_edit', false)
Ignore custom field in edit address form in my account page.

Parameters

Boolean value

Usage

add_filter('thwcfe_ignore_custom_fields_in_address_to_edit', '__return_true');

Default value

false

Location

public/class-thwcfe-public-myaccount.php

thwcfe_edit_address_ignore_row_split

apply_filters('thwcfe_edit_address_ignore_row_split', true);
Ignoring the form row first an last class.

Parameters

Boolean value

Usage

add_filter('thwcfe_edit_address_ignore_row_split', '__return_false');

Default value

true

Location

public/class-thwcfe-public-myaccount.php

thwcfe_edit_address_form_enctype_multipart ?????????

apply_filters('thwcfe_edit_address_form_enctype_multipart', false);

Parameters

Boolean value

Usage

Default value

false

Location

public/class-thwcfe-public-myaccount.php

thwcfe_show_in_my_account_page

apply_filters('thwcfe_show_in_my_account_page', true, $key);
Display / remove checkout field in my account page & edit address forms.

Parameters

$key - string (field_name)

Usage

add_filter('thwcfe_show_in_my_account_page', 'er3_show_in_my_account_page', 10, 2);

function er3_show_in_my_account_page($show, $key){
	
	return $show;
}

Default value

True

Location

public/class-thwcfe-public-myaccount.php

thwcfe_edit_account_enable_file_support

apply_filters('thwcfe_edit_account_enable_file_support', true);
Add enctype="multipart/form-data" attribute in edit account form.

Parameters

Boolean

Usage

add_filter('thwcfe_edit_account_enable_file_support', '__return_false');

Default value

true

Location

public/class-thwcfe-public-myaccount.php

thwcfe_show_section_in_my_account_page

apply_filters('thwcfe_show_section_in_my_account_page', true, $sname);
Show section in my account page.

Parameters

$sname - string (section name)

Usage

add_filter('thwcfe_show_section_in_my_account_page', '__return_false');

Default value

true

Location

public/class-thwcfe-public-myaccount.php

thwcfe_show_section_title_in_my_account_page

apply_filters('thwcfe_show_section_title_in_my_account_page', $show_section_title, $sname);
Override show section title settings of my account page.

Parameters

$show_section_title - string $sname - string

Usage

add_filter('thwcfe_show_section_title_in_my_account_page', 'er3_show_in_my_account_page', 10, 2);

function er3_show_in_my_account_page($show_section_title, $section_name){
	
	return $show_section_title;
}

Default value

True or false as per section settings.

Location

public/class-thwcfe-public-myaccount.php

thwcfe_skip_address_fields_override_with_locale

apply_filters('thwcfe_skip_address_fields_override_with_locale', false)
Skip address field override by checkout field Editor.

Parameters

Boolean value

Usage

add_filter('thwcfe_skip_address_fields_override_with_locale', '__return_true');

Default value

false

Location

public/class-thwcfe-public.php

thwcfe_show_edit_address_form_field_$key

apply_filters('thwcfe_show_edit_address_form_field_'.$key, true, $sname, $field);

Parameters

Usage

Default value

Location

public/class-thwcfe-public.php

thwcfe_file_upload_maxsize

apply_filters('thwcfe_file_upload_maxsize', $maxsize, $name);
File upload maximum size

Parameters

$maxsize - Integer $name - string

Usage

add_filter('thwcfe_file_upload_maxsize', 'm35rt_file_upload_maxsize', 10, 2);
function m35rt_file_upload_maxsize($maxsize, $name){
	
	return $maxsize;
}

Default value

Value as per field setting.

Location

public/class-thwcfe-public.php

thwcfe_file_upload_accepted_file_types

apply_filters('thwcfe_file_upload_accepted_file_types', $accept, $name);
Acceptable file type for file upload field.

Parameters

$accept - array $name - string

Usage

add_filter('thwcfe_file_upload_accepted_file_types', 'm35rt_file_upload_accepted_file_types', 10, 2);
function m35rt_file_upload_accepted_file_types($accept, $name){
	
	return $accept;
}

Default value

Value as per field settings

Location

public/class-thwcfe-public.php

thwcfe_ignore_fields

apply_filters('thwcfe_ignore_fields', array());
Ignore fields in checkout form.

Parameters

array

Usage

add_filter('thwcfe_ignore_fields', 'thwcfe_ignore_field_array');
function thwcfe_ignore_field_array($fields){
	$fields = array('field_name_1, field_name_2, field_name_3');

	return $fields;
}

Default value

empty array

Location

public/class-thwcfe-public.php

thwcfe_woocommerce_form_field_value

apply_filters( 'thwcfe_woocommerce_form_field_value', $value, $key );
Filter form field value

Parameters

$value - string $key - string

Usage

add_filter('thwcfe_woocommerce_form_field_value', 'change_new_value_to_field', 10, 2);
function change_new_value_to_field($value, $key){
	if($key == 'field_name'){
		$value = 'new value';
	}
	
	return $value;
}

Default value

Value as per submitted data

Location

public/class-thwcfe-public.php

woocommerce_form_field_args

apply_filters( 'woocommerce_form_field_args', $args, $key, $value );

Parameters

$args - array $key - string $value - string

Usage

add_filter('woocommerce_form_field_args', 'change_form_field_args', 10, 3);
function change_form_field_args($args, $key, $value){
	$arg = // new arg for the field;

	return $args;
}

Default value

array as per field settings.

Location

public/class-thwcfe-public.php

thwcfe_disable_checkout_field_autocomplete

apply_filters('thwcfe_disable_checkout_field_autocomplete', false, $key);
Disable field auto compleete.

Parameters

Boolean
$key - string

Usage

add_filter('thwcfe_disable_checkout_field_autocomplete', 'change_autocomplete_parameter', 10, 2);
function change_autocomplete_parameter($flag, $key){
	if($flag == 'field_name'){
		$flag = true;
	}

	return $flag;
}

Default value

false

Location

public/class-thwcfe-public.php

thwcfe_is_readonly_field_$key

apply_filters(‘thwcfe_is_readonly_field_’.$key, false)); Make field as read only.

Parameters

Boolean value

Usage

add_filter('thwcfe_is_readonly_field_your_field', 'm35rt_read_only_field');
function m35rt_file_upload_maxsize($read_only){
	
	return $read_only;
}

Default value

false

Location

public/class-thwcfe-public.php

thwcfe_display_field_description_below_label

apply_filters('thwcfe_display_field_description_below_label', false, $key)
Display field description below label

Parameters

Boolean $key - string

Usage

add_filter('thwcfe_display_field_description_below_label', 'm35rt_display_field_description_below_label', 10, 2);
function m35rt_display_field_description_below_label($show_below, $key){

	return $show_below;
}

Default value

false

Location

public/class-thwcfe-public.php

thwcfe_input_field_options_$key

apply_filters( 'thwcfe_input_field_options_'.$key, $args['options_object'] );
Override field’s settings by checkout field editor plugin

Parameters

Object

Usage

add_filter('thwcfe_input_field_options_your_field', 'm34er_input_field_options');
function m34er_input_field_options($_Object){

	return $_Object;
}

Default value

Field settings

Location

public/class-thwcfe-public.php

thwcfe_checkboxgroup_options_per_line

apply_filters('thwcfe_checkboxgroup_options_per_line', 1, $key);

Parameters

Usage

Default value

Location

public/class-thwcfe-public.php

thwcfe_input_field_options

apply_filters( 'thwcfe_input_field_options', $args['options_object'], $key );
Override field’s settings by checkout field editor plugin.

Parameters

$args[‘options_object’] - object $key - string

Usage

add_filter('thwcfe_input_field_options_your_field', 'm34er_input_field_options', 10, 2);
function m34er_input_field_options($_Options, $key){

	return $_Options;
}

Default value

Field settings

Location

public/class-thwcfe-public.php

thwcfe_min_date_date_picker_$key

apply_filters( 'thwcfe_min_date_date_picker_'.$key, $minDate );
Set date picker min date.

Parameters

$minDate - Integer

Usage

add_filter('thwcfe_min_date_date_picker_your_field_name', 'change_mindate_parameter');
function change_mindate_parameter($min_date){

	return $min_date;
}

Default value

Value as per field setting.

Location

public/class-thwcfe-public.php

thwcfe_max_date_date_picker_$key

apply_filters( 'thwcfe_max_date_date_picker_'.$key, $maxDate );
Set date picker max date.

Parameters

Integer

Usage

add_filter('thwcfe_max_date_date_picker_your_field_name', 'change_maxdate_parameter');
function change_maxdate_parameter($max_date){

	return $max_date;
}

Default value

Value as per field setting.

Location

public/class-thwcfe-public.php

thwcfe_disabled_days_date_picker_$key

apply_filters( 'thwcfe_disabled_days_date_picker_'.$key, $disabledDays );
Set disabled day for date picker field.

Parameters

Coma seperated week days abbrivation

Usage

add_filter('thwcfe_disabled_days_date_picker_your_field_name', 'th34_override_disabled_days');
function th34_override_disabled_days($disabled_days){
	
	return $disabled_days;
}

Default value

Value as per field setting.

Location

public/class-thwcfe-public.php

thwcfe_disabled_dates_date_picker_$key

apply_filters( 'thwcfe_disabled_dates_date_picker_'.$key, $disabledDates );
Set disabled dates for date picker field.

Parameters

Coma seperated dates in yyyy-mm-dd format.

Usage

add_filter('thwcfe_disabled_dates_date_picker_your_field_name', 'th34_override_disabled_dates');
function th34_override_disabled_dates($disabled_dates){
	
	write_log($disabled_dates);
	
	return $disabled_dates;
}

Default value

Value as per field setting.

Location

public/class-thwcfe-public.php

thwcfe_date_picker_first_day

apply_filters( 'thwcfe_date_picker_first_day', 0, $key );
Set date picker’s first day

Parameters

Intiger - Week day number $key - String

Usage

add_filter('thwcfe_date_picker_first_day', 'change_new_start_day', 10, 2);
function change_new_start_day($value, $key){

	return $value;
}
0 - for Sunday 1 - for Monday 6 - for Saturday

Default value

0 - (Sunday)

Location

public/class-thwcfe-public.php

thwcfe_min_time_time_picker_$key

apply_filters( 'thwcfe_min_time_time_picker_'.$key, $args['min_time'] );
Set minimum time for time picker.

Parameters

Time in 12 hour format

Usage

add_filter('thwcfe_min_time_time_picker_your_field_name', 'change_min_time_picker', 10, 1);
function change_min_time_picker($min_time){
	
	return $min_time;
}

Default value

12:00am / value as per field settings

Location

public/class-thwcfe-public.php

thwcfe_max_time_time_picker_$key

apply_filters( 'thwcfe_max_time_time_picker_'.$key, $args['max_time'] );
Set max time for time picker field.

Parameters

Time in 12 hour format

Usage

add_filter('thwcfe_max_time_time_picker_your_field_name', 'change_max_time_picker', 10, 1);
function change_max_time_picker($max_time){
	
	return $max_time;
}

Default value

11:30pm / value as per field settings

Location

public/class-thwcfe-public.php

thwcfe_start_time_time_picker_$key

apply_filters( 'thwcfe_start_time_time_picker_'.$key, $args['start_time'] );
Set selectable time by considering current time & min. time for time picker. Example like prepartion time. If min time is 10 AM & user current time is 11 AM & start time is 2 hour, user can only select time slots after 1 PM.

Parameters

String - (Hour & minutes)

Usage

add_filter('thwcfe_start_time_time_picker_your_field_name', 'er34t_start_time_time_picker');
function er34t_start_time_time_picker($start_time){
	return $start_time;
}

Default value

False

Location

public/class-thwcfe-public.php

thwcfe_time_step_time_picker_$key

apply_filters( 'thwcfe_time_step_time_picker_'.$key, $args['time_step'] );
Step for time picker field.

Parameters

Integer - (Minutes as integer)

Usage

add_filter('thwcfe_time_step_time_picker_your_field_name', 'we34r_change_time_step');
function we34r_change_time_step($time_step){
	return $time_step;
	
}

Default value

30

Location

public/class-thwcfe-public.php

thwcfe_linked_date_time_picker_$key

apply_filters( 'thwcfe_linked_date_time_picker_'.$key, $args['linked_date'] );
Link date picker field with a time picker field. Example case - Disable time picker on Sunday if there is another date picker field with Sunday as disabled day.

Parameters

String (field name)

Usage

add_filter( 'thwcfe_linked_date_time_picker_your_field_name', 'qs325_link_date_picker_time_picker' );
function qs325_link_date_picker_time_picker($date_picker_field_name){
	
	return $date_picker_field_name;
}

Default value

Empty

Location

public/class-thwcfe-public.php

thwcfe_my-account_file_name_prefix

apply_filters('thwcfe_my-account_file_name_prefix', '', $key);
Add / Change uploaded file’s name prefix.

Parameters

Empty string $key - String

Usage

add_filter( 'thwcfe_my-account_file_name_prefix', 'qs325_thwcfe_uploaded_file_name_prefix', 10, 2 );
function qs325_thwcfe_uploaded_file_name_prefix($prefix, $key){
	
	return $prefix;
}

Default value

Empty string

Location

public/class-thwcfe-public.php

thwcfe_woo_api_order_response_fields

apply_filters('thwcfe_woo_api_order_response_fields', $fields);
Add custom checkout field data in to old legacy WooCommerce REST API responce.

Parameters

  1. $fields (array)

Usage

add_filter('thwcfe_woo_api_order_response_fields', 'th_custom_function');

function th_custom_function(){
	return array('field_1', 'field_2');
}

Default value

Empty array

Location

includes/compatibility/class-wcfe-wc-api-handler.php

Conditionally displaying fields based on Review Panel fields

For setting up a conditional rule based on the Review panel you must enable the checkbox
  • Enable conditional rules for Review Panel
in the Advanced Settings → Other Settings.
[IMPORTANT] The conditional rule applied for fields placed in the sections for which position is set as Before terms and conditions/ After terms and conditions/ Before Submit button/ After submit button will only function if this option is enabled. Following are the steps to configure the rule:
  1. Go to Advanced Settings.
  2. Check the option Enable conditional rules for Review Panel.
  3. Save the changes.

Backup and Import Settings

The saved settings of the plugin can be imported using the Backup and Import settings feature. Steps to Backup and Import settings:
  1. Go to Advanced Settings ⇨ Backup and Import settings.
  2. Copy the text from the Plugin Settings Data that you want to import.
  3. Insert the copied data to the Plugin Settings Data of the other website.
Click Import Settings. The plugin settings will be copied.

Override Default Address format & Include Custom Address Fields in Address Display

By default, billing and shipping Addresses are displayed as formatted by WooCommerce, which is different for each country and includes only default address fields. In addition to these default address fields, you can also display your custom fields which is created using WooCommerce Checkout Field Editor Pro plugin. Please follow below steps to include custom address fields in address display,
  1. Go to Custom Address Fields section in Advanced Settings page.
  2. Choose the custom billing fields form "Custom billing address keys" drop-down list those you want to include in billing address display.
  3. Choose the custom shipping fields form "Custom shipping address keys" drop-down list those you want to include in shipping address display.
  4. Override default address formats to include custom address fields in address display. Display address format is different for each country hence you may need to override address format for each country. Each country format should be separated by pipe (|). 
  5. Click on the Save changes button.
Below screenshot shows an example for custom field display in billing and shipping address,
[IMPORTANT]Following is a sample of the format entered in the Address Format Overrides field:
default=>{name}\n{company}\n{building_name_billing}\n{building_no_billing}\n{address_1}\n{building_name_shipping}\n{building_no_shipping}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}|IN=>{name}\n{company}\n{building_name_billing}\n{building_no_billing}\n{building_name_shipping}\n{building_no_shipping}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country} 
 

Watch this tutorial to see the complete steps of Custom Address Format Overriding: https://www.youtube.com/watch?v=ggXI8ZpOnAE

Include Custom Checkout Fields in PDF Invoices & Packing Slips

You can include your custom checkout fields in PDF Invoices & Packing Slips which is generated by WooCommerce PDF Invoices & Packing Slips plugin. Please follow below steps to choose the fields which you want to include in Invoices.
  1. Go to Advanced Settings page.
  2. Tick the checkbox Enable PDF Invoice & Packing Slip support in Advanced Settings page.
  3. Choose the fields which you want to include in Invoices from the multi-select box Invoice Fields.
  4. Click on Save changes button.
Follow below steps to choose the fields which you want to include in Packing Slips.
  1. Go to Advanced Settings page.
  2. Tick the check box Enable PDF Invoice & Packing Slip support in Advanced Settings page.
  3. Choose the fields which you want to include in Packing Slips from the multi-select box Packing Slip Fields.
  4. Click on Save changes button.

Export Custom Checkout Fields/Include custom field to CSV Export

You can export your custom checkout fields using WooCommerce Customer / Order CSV Export (by SkyVerge) plugin. Please follow below steps to choose the fields which you want to export.
  1. Go to CSV Export Fields section in Advanced Settings page.
  2. Select the checkbox "Enable CSV Export support".
  3. Choose the fields which you want to export from the multi-select box "CSV export columns".
  4. Click on Save changes button.

Steps to Export the Custom Fields using Customer/Order CSV Export plugin

  • Go to Dashboard → WooCommerce → CSV Export.
  • Click on the Export button below the page.
  • A popup will appear which will automatically export the data into a CSV file.

Where do the custom checkout fields get saved or displayed?

In WooCommerce Checkout Field Editor other than default fields, custom fields can also be added to the checkout form. When you add a custom field in checkout page it gets created either as Order Field (order meta data) or as User Field (user meta data) based on the settings.

Order Fields (Order Meta Data)

The order meta data are the information provided which are specific to orders and has no direct relation to the user’s information. (For example Delivery Date, which is specific for each purchase). Order fields will be saved in wp_postmeta table as Order Meta data and will be displayed in multiple places. To create Order fields you must select the checkbox "Order Meta Data"

User Fields (User Meta Data)

The user meta data are the information directly related to the user and will be the same for almost every order. Data like date of birth, email, billing and shipping addresses, etc. belong to this category. User fields will be saved in wp_usermeta table as User Meta data and will be displayed in multiple places. Custom user fields values can be updated from user profile page. To create User fields you must select the checkbox "User Meta Data"

Display Places

When you add an custom checkout field it gets displayed in different pages and emails based on the selections you made in field settings using the check-boxes marked in below screenshot, The following screenshots show the different places where you can see the custom fields and the input provided by the customer.

Display in Thank You Page

Display in Order Detail Pages

Display in Customer Emails

Display in Admin Emails

Adding Date Picker in WooCommerce Checkout Page

This article explains the steps to add a Date Picker in WooCommerce Checkout page by correctly configuring WooCommerce Checkout Field Editor plugin.Using this plugin you can customize WooCommerce checkout fields. In this article we will focus on adding a custom Date Picker. You can learn more about the plugin and purchase it from here. For installation of the plugin please follow this article OnceWooCommerce Checkout Field Editor is installed, you can access plugin settings page via WooCommerce → Checkout Form. Always click on the 'Save Changes' button to save your changes.

Add New Date Picker Field

To add a new Date Picker field, first go to one of the section(billing, shipping, additional) where you want to add the field, and then click the ‘Add Field’ button.
It will open a popup form where you need to select Date Picker from the Field Type select box. Fill the name for the field and other properties in the form and click on ‘Add New Field’ button. Finally click on the ‘Save Changes’ button so that the new changes take effect.

Date Picker Field Properties

  • Name: The name property specifies the unique name of the field, which is used as the meta key to save value internally in database. This will NOT be displayed on checkout page. Name must be unique. eg 'lead_source'
  • Type: This is the property that allows you to choose the type of the field that need to be added. Select Date picker. It will add a text field with a JavaScript date picker attached to the Checkout form.
  • Label: Label is the display name for the input field which will be shown on the checkout page. This will also be displayed on the Email, Thank You Page, Order Details Page etc.
  • Default Value: You can assign a default value for the field by providing the value here. This value will be shown as the default value when the checkout form is loaded.
  • Placeholder: The placeholder property is a short hint (a sample value or a short description of the expected format) that describes the expected value of an input field.
  • CSS Class: In case you want the input field to be styled differently, you can add a css class for the field. You may need to define the styles for this class in your stylesheet.
  • Label Class: Similarly, in case you need the Label to be styled separately you may define the CSS class name here.
  • Validations: Choose validation rules that should be applied to the input field. You can define your own validation rules in the Advanced Settings section. Any validation rule defined in Advanced Settings section will appear in the select box.
  • Price: In case you need to increase or decrease the cart total based on the user input in the checkout page you can do so using this field. Provide a negative value if you want to give discount.
  • Price Type: You can set the price type as ‘Normal’ which means the set price just get added to the total or ‘Percentage’ where in the specified percentage of the cart total gets added to the total.
  • Max. Length: The maxlength property specifies the maximum number of characters allowed in the <input> element. You can leave this blank.
  • Required: If you select this option the field will be shown as a required field in checkout page. If a value is not entered or selected for this field a warning will be displayed.
  • Clear Row: This property is useful to align fields left and right on the same row. Selecting ‘Clear Row’ stops a field being shown on the same row as the previous field. Field will be forced to display on the next row.
  • Enabled: By default this property will be selected and field will be enabled. If you want to disable the field you need to deselect this. A disabled field will not be displayed on the checkout page. It will kept in the field list on the admin side in case you need to enable it again in the future. Use remove button if you want to remove a field permanently.
  • Display in Emails: If this property is selected, the field and its value will be displayed in Order Confirmation email (customer copy) and Thank You mail.
  • Display in Order Detail Pages: This property can be used to display your custom field and its value in Order Confirmation page (Thank You page) and Order Details page (Admin page).
  • Order Meta Data: This property can be used to save your custom field and its value as part of order data (saved in order meta table), so that this field value will be specific to each order.
  • User Meta Data: This property can be used to save your custom field and its value as part of user data (saved in user meta table), so that the custom field will available in user profile page and user can edit the value from there.
  • Date Format: Define the date format accepted for this field. Available options are: dd/mm/yy.
  • Default Date: Set default date to be displayed. Specify the date in the format specified in Date Format property. You may also specify the number of days to be offset from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or leave empty if you don’t want to set a minimum limit.
  • Min. Date: The date picker calendar will only show dates starting from the date set in this field. Specify the date in the format specified in Date Format property. You may also specify the number of days to be offset from today (e.g. -7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '-1m -7d'), or leave empty for today.
  • Max. Date: The calendar will only show dates up to the date set in this field. Specify the date in the format specified in Date Format property. You may also specify the number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or leave empty if you don’t want to set a maximum limit.
  • Year Range: This is defines the range of years displayed in the year drop-down of the date picker calendar. The format is “from year: to year”. You can set the range in different ways as explained below
    • Relative to current year('-nn:+nn'): e.g. -5:+3 . If the current year is 2016, the dropdown will show years from 2011 till 2019.
    • Relative to the currently selected year('c-nn:c+nn'): e.g. c-5:c+3. If the year of the selected date is 2017, the dropdown will show years from 2012 till 2020
    • Absolute values('nnnn:nnnn'): e.g. 1900:2018. The dropdown will show years from 1900 till 2018
    • Combinations of above formats('nnnn:+nn','-nn:c+nn',etc.. ): e.g. 2012:+3. The dropdown will show years from 2012 till 2019 if the current year is 2016. eg -5:c+3. The dropdown will show years from 2011 till 2020 if the current year is 2016 and selected date is in the year 2017.Note that this option only affects what appears in the year drop-down on the calendar popup. To restrict which dates may be selected from the calendar, use the Min. Date and/or Max. Date properties.
  • Number Of Months: The number of months to show at once on the date picker calendar.
  • Disabled Days: Select the days of the week that need to be disabled on the calendar. For example, you way want to disable Saturdays and Sundays on the calendar.
  • Disabled Dates: Enter dates that need to be disabled on the calendar in yyyy-mm-dd format separated by commas for multiple dates. This is useful if you want to disable specific days such as holidays. Ensure the dates are provided in the correct format. If you want to disable 17th January 2017 and  23rd March 2017 in the date picker you can fill this field with the value 2017-01-17,2017-03-23
Once you configure the Date Picker field you will see the field in WooCommerce checkout page as shown below

How to disable specific days in date-picker

You can disable specific days from the calendar using Disabled Days option in the field settings form. Choose the days that need to be disabled on the calendar from the Disabled Days multi-select drop-down. This is useful if you want to disable specific days such as Saturdays and Sundays. For example, if you want to disable Saturdays and Sundays in the date picker you can choose these days from the drop-down options.

How to disable specific dates in date-picker

You can disable specific dates from the calendar using "Disabled Dates" option in the field settings form. Enter dates that need to be disabled on the calendar in yyyy-mm-dd format separated by commas for multiple dates. This is useful if you want to disable specific days such as holidays. Ensure the dates are provided in the correct format. For example, if you want to disable 3rd March 2017(Mother's Day) and 25th December 2017(Christmas Day) in the date picker you can fill this field with the value 2017-03-03,2017-12-25.