=== Flexible Checkout Fields for WooCommerce ===

Contributors: wpdesk,dyszczo,grola,piotrpo,marcinkolanko
Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
Tags: woocommerce checkout fields, woocommerce custom fields, woocommerce checkout manager, woocommerce checkout editor, woocommerce fields manager, woocommerce fields editor, woocommerce custom checkout fields, woocommerce checkout options, woocommerce checkout pro, woocommerce custom sections, woocommerce file upload
Requires at least: 4.5
Tested up to: 5.5
Stable tag: 2.5.7
Requires PHP: 5.6
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

The best looking Checkout Fields plugin. Add, edit, remove WooCommerce checkout fields with a visual interface. Customize your WooCommerce checkout.

== Description ==

We think WooCommerce is the best e-commerce plugin for WordPress. But it lacks some very basic features like customizing checkout fields in an easy to use interface. You can do it by hooks and filters but why bother if you can do it by Flexible Checkout Fields for WooCommerce. With this plugin you can edit the default fields (change labels, hide, delete) or add your own. You can set your own fields order. There’s a lot of field types such as a checkbox field, a date field or a color picker field (some of them exclusively in the PRO version). Read on to see how easy it is to edit WooCommerce checkout fields with this plugin and how powerful it is.

= The WordPress Look&Feel =

Flexible Checkout Fields beautifully integrates with the WordPress dashboard. It is probably the best looking WooCommerce Checkout Fields Manager plugin on the market. And you can do some powerful stuff with it too. [See some screenshots →](https://wordpress.org/plugins/flexible-checkout-fields/screenshots/)

= Fields Order =

Just drag&drop to reorder fields. You can reorder WooCommerce built-in fields as well as custom fields that you add yourself. Mix them any way you like or need. If other plugins add their custom fields in many cases you will also be able to rearrange them (if added properly by the plugin author).

= Labels and Placeholders =

Want to change *Company name* to just *Company* or *Your Awesome Company*? Just edit the label and it will instantly appear in the checkout. **Pro tip**: You can also use HTML inside labels!

Want to give your customers a tip on how to fill a field? You can do it with an explanatory placeholder (it will show inside the field). For example *Enter your full company name*.

= Show or Hide Fields =

You do not need a customer's phone number or second line address? Just hide the fields from the checkout and you're good to go. This is just one click away. Decide to show it later? Just another click and the field shows again.

= Display Fields on Other Pages =
You can display the fields not only in the checkout. Just mark a specific checkbox under the ‘Display On’ tab as checked. You have 4 different locations to use:
* Thank You Page
* My Account - address
* My Account - order
* Emails

= Required or Optional Fields =

Easily manage which fields should be required and which optional. Just click a *required* checkbox in the field settings and make a field required or optional. Works both ways.

= Custom CSS Class =

Add some style to your fields. By adding a custom class to each field you can then uniquely style it in your theme's stylesheet.

= Add New Custom Fields =

Add new fields to WooCommerce checkout:

**Free**

* Single Line Text
* Paragraph Text

**PRO**

* Checkbox
* Radio button
* Select (Drop Down)
* Multi-select
* Date
* Time
* Color Picker
* Headline
* HTML or plain text
* File Upload

= Multilanguage ready =

Flexible Checkout Fields is compatible with WPML and Polylang and lets you translate fields data to other languages.

= Use your meta names =
Are you a developer? You can set any meta name you want. This is the name of the field in the database. You can easily integrate this plugin with your custom code due to this function.

= Field validation =
WooCommerce has built-in validation of a phone number, an email address and a postcode. We let you use this validation in the new fields you add to your store using this plugin.

Standard WooCommerce validation is not enough? You can add your own validation to any field you create in this plugin. You can find a code example in [Flexible Checkout Fields docs →](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/)

= Custom Field Sections (PRO) =

Billing, Shipping or Order sections are not enough? Now you can add fields to 12 other checkout sections. Below you will find all sections and their corresponding hooks (hooks are just for developers' reference - if you do not know what hooks are, just ignore them and you'll be just fine - it will just work).

* Before Customer Details
* After Customer Details
* Before Billing Form
* After Billing Form
* Before Shipping Form
* After Shipping Form
* Before Registration Form
* After Registration Form
* Before Order Notes
* After Order Notes
* Before Submit
* After Submit

= Conditional Logic for Fields (PRO) =

Enable conditional logic (show or hide) for fields based on other fields values (checkbox, radio, select).

= Conditional Logic for Shipping Methods (PRO) =

Enable conditional logic (show or hide) for fields based on selected shipping method.

= Conditional Logic for Products and Categories (PRO) =

Enable conditional logic (show or hide) for fields based on products and/or categories in the cart, i.e.:

* Show engraving field for jewelery category
* Show delivery date option only for physical products
* Show VAT Number for digital goods
* Hide address fields for digital goods

This plugin is compatible with variable products.

> **Upgrade to Flexible Checkout Fields PRO**<br />
> Get all PRO features and priority e-mail support. [Upgrade Now →](https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/?utm_source=wporg&utm_medium=link&utm_campaign=wporg-fcf)

= Well Documented =

We are proud of our docs. We spend a great deal of time to polish them and make them as complete as possible. [Read Flexible Checkout Fields Docs →](https://www.wpdesk.net/docs/woocommerce-checkout-fields-docs/)

= Support Policy =

We provide a limited support for the free version in the [plugin Support Forum](https://wordpress.org/support/plugin/flexible-checkout-fields/). Please purchase a PRO version to get priority e-mail support as well as all e-commerce features. [Upgrade Now →](https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/?utm_source=wporg&utm_medium=link&utm_campaign=wporg-fcf)

> **Get more WooCommerce plugins from WP Desk**<br />
> We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)

= Flexible Checkout Fields in a nutshell =

Key features:

* make the purchasing experience as flawless as possible for your users,
* remove pain points related to the checkout process,
* allow for delivery personalization,
* manage fields in WooCommerce,
* time picker in WooCommerce checkout,
* date picker in WooCommerce checkout,
* color picker in WooCommerce checkout,
* file upload in WooCommerce checkout,
* manage fields in WooCommerce,
* add WooCommerce VAT ID number,
* add WooCommerce checkout fields,
* add WooCommerce custom checkout fields.

== Installation	 ==

You can install this plugin like any other WordPress plugin.

1. Download and unzip the latest release zip file.
2. Upload the entire plugin directory to your /wp-content/plugins/ directory.
3. Activate the plugin through the Plugins menu in WordPress Administration.

You can also use WordPress uploader to upload plugin zip file in menu Plugins -> Add New -> Upload Plugin. Then go directly to point 3.

== Frequently Asked Questions ==

= Where I can find the plugin docs? =

The docs are located here: [Flexible Checkout Fields Docs](https://www.wpdesk.net/docs/woocommerce-checkout-fields-docs/)

= Can I add custom field sections? =

Yes, but you will have to purchase [Flexible Checkout Fields PRO](https://www.wpdesk.net/products/woocommerce-checkout-fields/).

== Screenshots ==

1. Editing Core Checkout Fields.
2. Adding New Fields.
3. Enabling Custom Sections (PRO version only).
4. Editing Custom Sections (PRO version only).
5. Fields Configuration.
6. Custom Fields Validation.
7. ‘Display On’ Configuration Tab.
8. Custom Field in the My account - Address section.

== Upgrade Notice ==

If you are upgrading from the old WooCommerce Checkout Fields version (1.1, woocommerce-checkout-fields) make sure to completely delete the old version first. Your settings will be kept. If you install the new version without deleting the old one you may break your WordPress installation.

== Changelog ==

= 2.5.7 - 2020-10-01 =
* Fixed saving field values to User Metadata from Order section
* Added escaping output for field label

= 2.5.6 - 2020-09-23 =
* Added notice of planned change of required PHP version to 7.0

= 2.5.5 - 2020-09-17 =
* Fixed placeholder option for Radio and Multi-select field

= 2.5.4 - 2020-09-16 =
* Added placeholder option for Select field (with empty value)

= 2.5.3 - 2020-09-01 =
* Fixed copying shipping details from billing details for same fields
* Added support for WooCommerce 4.5

= 2.5.2 - 2020-08-25 =
* Fixed overwriting of field classes by WooCommerce locale

= 2.5.1 - 2020-08-10 =
* Added support for WordPress 5.5

= 2.5.0 - 2020-08-06 =
* Added action `flexible_checkout_fields_validate_{$field_type}` for custom validation
* Added new argument to callback function for filter `flexible_checkout_fields_custom_validation`

= 2.4.14 - 2020-07-22 =
* Fixed displaying empty address in user profile

= 2.4.13 - 2020-07-08 =
* Fixed SyntaxError in JavaScript

= 2.4.12 - 2020-06-23 =
* Added additional request sanitization

= 2.4.11 - 2020-05-12 =
* Fixed field name validation - validation works only on currently added fields

= 2.4.10 - 2020-05-04 =
* Fixed additional fields not saved in user profile

= 2.4.9 - 2020-04-21 =
* Fixed missing Copy from billing address button

= 2.4.8 - 2020-04-09 =
* Fixed warnings on settings saving

= 2.4.7 - 2020-04-03 =
* Fixed warnings on settings page

= 2.4.6 - 2020-03-30 =
* Fixed missing jQuery UI images
* Fixed checkboxes in user profile
* Fixed 0 in default value

= 2.4.5 - 2020-03-23 =
* Fixed HTML in field label
* Fixed file upload error

= 2.4.4 - 2020-03-20 =
* Fixed fatal error in user profile

= 2.4.3 - 2020-03-12 =
* Fixed user profile form
* Fixed field name validation
* Fixed multiselect value warning
* Added ability to display state code

= 2.4.2 - 2020-03-12 =
* Fixed error in settings on unknown field type

= 2.4.1 - 2020-03-10 =
* Added formatting for billing and shipping fields on pages and emails

= 2.4.0 - 2020-03-06 =
* Added additional request sanitization
* Tweaked remote calling css files

= 2.3.4 - 2020-02-25 =
* Fixed attibute/value escaping in admin panel and on checkout page
* Added additional security hardenings

= 2.3.3 - 2020-02-25 =
* Added security nonce to settings form

= 2.3.2 - 2020-02-25 =
* Fixed security issue on settings update

= 2.3.1 - 2020-02-20 =
* Added support for the latest Flexible Checkout Fields PRO release
* Fixed customer address' details on thank you page

= 2.2.4 - 2020-01-27 =
* Fixed typo in the settings' field tooltip

= 2.2.3 - 2020-01-03 =
* Added support for WooCommerce 3.9

= 2.2.2 - 2019-12-17 =
* Fixed WPML compatibility

= 2.2.1 - 2019-11-05 =
* Fixed fakepath in the file's name

= 2.2.0 - 2019-09-23 =
* Prefixed libraries

= 2.1.4 - 2019-09-19 =
* Fixed invoice fields integration for wFirma/iFirma/inFakt/Fakturownia

= 2.1.3 - 2019-09-09 =
* Fixed display of fields that contains name 'billing'

= 2.1.2 - 2019-09-04 =
* Fixed reordering fields in account address page
* Fixed set require for WC predefined fields

= 2.1.1 - 2019-08-29 =
* Fixed warning "Illegal string offset" when shipment is disabled

= 2.1.0 - 2019-08-21 =
* Fixed integration with Flexible Invoices invoice_ask field
* Added filter flexible_checkout_fields_invoices_integration_enabled

= 2.0.10 - 2019-08-19 =
* Fixed required field validation for html field
* Fixed "display on" section in custom sections

= 2.0.8 - 2019-08-13 =
* Fixed fatal error when WPDesk_Tracker_Factory is not loaded by autoloader

= 2.0.7 - 2019-08-12 =
* Fixed warning in admin are on CSS class

= 2.0.5 - 2019-08-06 =
* Postcode validation is available only in billing and shipping sections

= 2.0.4 - 2019-07-11 =
* Fixed error while activating in multisite environment

= 2.0.3 - 2019-07-11 =
* Fixed rare change for fatal error when activating plugin

= 2.0.2 - 2019-07-03 =
* Fixed integration with a PRO plugin

= 2.0.1 - 2019-07-02 =
* Fixed jQuery conflict with WOOBE Bulk editor plugin

= 2.0.0 - 2019-06-25 =
* Fixed state field: requirement is controlled by WooCommerce
* Added support for WPDesk libraries

= 1.9.3 - 2019-05-06 =
* Fixed field name verification - used toLowerCase method.

= 1.9.2 - 2019-04-04 =
* Fixed fatal error in restore_default_city_validation

= 1.9.1 - 2019-03-14 =
* Fixed account error notice on checkout page
* Fixed single quote in placeholder
* Fixed licence checking
* Remove slashes from additional information

= 1.9.0 - 2019-02-26 =
* Fixed section settings fields saving

= 1.8.3 - 2019-02-25 =
* Tweaked FCF PRO activation checking
* Fixed error of sorting fields

= 1.8.2 - 2019-01-31 =
* Fixed fields order in configuration
* Fixed unwanted validation on additional sections when PRO plugin disabled
* Fixed box display for incorrect validation
* Fixed errors after save fields
* Fixed Polylang translations on select options
* Fixed non city countries validation

= 1.8.1 - 2019-01-15 =
* Fixed CSS WP Menu

= 1.8 - 2018-12-19 =
* Added ability to edit placeholder on City and Postcode
* Added file field in thank you page and emails
* Added functionality for removed ability to edit file field for customer
* Fixed: PHP warning invalid argument supplied for foreach
* Removed display checkbox on My Account - address for file field

= 1.7.2 - 2018-12-19 =
* Fixed missing additional fields in emails

= 1.7.1 - 2018-12-13 =
* Added DIVI compatibility

= 1.7.0 - 2018-12-06 =
* Added required changes for PRO version and multi-select field
* Added required changes for PRO version and select2 styling

= 1.6.10 - 2018-10-16 =
* Added support for WooCommerce 3.5
* Dropped support for WooCommerce 3.0 and older (the plugin may still work with older versions but we do not declare official support)

= 1.6.9 - 2018-09-18 =
* Fixed edit address pages for WPML Strings

= 1.6.8 - 2018-07-10 =
* Removed fields name validation on existing fields

= 1.6.7 - 2018-06-26 =
* Fixed error with conflict in tracker

= 1.6.6 - 2018-06-25 =
* Tweaked tracker data anonymization
* Fixed tracker notice

= 1.6.5 - 2018-05-25 =
* Fixed missing address in emails

= 1.6.4 - 2018-05-23 =
* Added support for WooCommerce 3.4

= 1.6.3 - 2018-04-19 =
* Fixed hooks priority for Display On settings tab
* Fixed required field message - removed HTML tags from field label
* Fixed add field function with HTML in label
* Fixed display NIP field added by the iFirma plugin

= 1.6.2 - 2018-03-29 =
*  Fixed problems with display email and phone fields on order edit page in admin area
* Fixed display the checkbox 'I would like to receive a VAT invoice in checkout' after turn on the Flexible Checkout Fields plugin when Flexible Invoices is available
* Removed hiding fields on order edit (the field will always be display on)
* Removed 'fakepath' from upload field


= 1.6.1 - 2018-03-01 =
* Fixed problems with deactivation plugin on multisite
* Fixed some minor issues

= 1.6 - 2018-01-21 =
* Added the option of disabling the display of fields in the Thank You Page and Emails, My Account
* Added protection removing the field and resetting the section settings
* Added the option to set custom meta name for the field
* Added standard WooCommerce validation for fields
* Added a filter to add custom validation
* Added a field type name to the field bar
* Fixed bug if WooCommerce is turn off

= 1.5.8 - 2018-01-28 =
* Added support for WooCommerce 3.3

= 1.5.7 - 2017-12-14 =
* Fixed issue with changing name and placeholder for core WooCommerce fields
* Fixed displaying field name when it's removed

= 1.5.6 - 2017-11-22 =
* Added unintrusive review request for WordPress.org - please support the free version and add a 5-star review!
* Fixed a minor display glitch in the admin

= 1.5.5 - 2017-11-08 =
* Fixed a bug with character encoding in emails
* Fixed a bug with required fields if option is unchecked
* Fixed fields position in My Account in Addresses tab

= 1.5.4 - 2017-10-25 =
* Fixed docs links
* Fixed some warnings in WooCommerce dashboard

= 1.5.3 - 2017-10-10 =
* Added support for WooCommerce 3.2
* Dropped support for WooCommerce 2.5.x (the plugin may still work but we do not declare official support)

= 1.5.2 - 2017-07-27 =
* Fixed issue with the fields order in the checkout
* Tweaked message in WP Desk Tracker class

= 1.5.1 - 2017-05-30 =
* Fixed fields sorting bug
* Integrated WP Desk Tracker class to help us understand how you use the plugin (you need to opt in to enable it)
* Added upgrade link to quick links

= 1.5 - 2017-04-03 =
* Added support for upcoming WooCommerce 3.0
* Dropped support for WooCommerce below 2.5 (the plugin may still work with older versions but we do not declare official support)

= 1.4 - 2017-02-15 =
* Added support for conditional logic in FCF PRO 1.4 (this update is necessary for FCF PRO 1.4)
* Disabled editing field name for: Town, State, Postcode (unsupported in WooCommerce)
* CSS tweaks for WordPress 4.7.x

= 1.3.3 - 2016-11-28 =
* Fixed radio buttons saving
* Strip tags from labels when viewing fields settings

= 1.3.2 - 2016-11-23 =
* Limit field names to 20 characters in order to prevent DB problems (this is only behind the scenes, labels and all user visible elements remain intact)

= 1.3.1 - 2016-10-24 =
* Fixed resetting section's settings which blocked ability to edit fields in the order
* Fixed potential warning on the thank you page

= 1.3 - 2016-10-07 =
* Added support for fields conditional logic based on products and categories (available in the PRO version)
* Added option to reset section settings
* Added better support for third party plugins that add checkout fields
* Added WPML and Polylang support

= 1.2.3 - 2016-09-22 =
* Fixed a warning on line 530

= 1.2.2 - 2016-09-16 =
* Fixed removing the last field from the section
* Fixed checkboxes default settings
* Fixed select not showing up
* Fixed removing order notes field

= 1.2.1 - 2016-09-08 =
* Fixed saving select field

= 1.2 - 2016-09-07 =
* Major Update!
* Released in WordPress Plugin Directory
* Changed name from WooCommerce Checkout Fields to Flexible Checkout Fields for WooCommerce
* Released a PRO version

= 1.1 – 2016-06-21 =
* Added new field: file upload
* Completely new look and feel that plays well with WordPress dashboard
* Converted to English
* Added Polish (pl_PL) translation
* Prepared the code for plugin new versions

= 1.0.2 – 2016-03-08 =
* Fixed (again) required asterisk for not required fields

= 1.0.1 – 2016-03-07 =
* Fixed required asterisk for not required fields

= 1.0 – 2016-01-26 =
* Automatic updates and license system

= 0.9.12 – 2015-04-14 =
* Added possibility to add HTML to labels

= 0.9.11 – 2015-02-27 =
* Tweaked editing custom fields in order details
* Added possibility to add HTML to additional checkboxes

= 0.9.10 – 2015-02-27 =
* Tweaked errors display for WooCommerce 2.3 compatibility

= 0.9.9 – 2015-01-20 =
* Fixed (again) additional checkboxes warnings

= 0.9.8 – 2015-01-20 =
* Fixed additional checkboxes warnings

= 0.9.7 – 2015-01-20 =
* Added additional checkboxes settings to display under payment details

= 0.9.6 – 2014-12-19 =
* Added new fields: select, radio, checkbox

= 0.9.5 – 2014-12-04 =
* Added e-mail and phone fields in order details
* Tweaked label, placeholder and class fields not to be required

= 0.9.4 – 2014-12-01 =
* Fixed Shipping Address override when the checkbox is checked

= 0.9.3 – 2014-11-26 =
* Tweaked CSS files to load only on required pages
* Added Settings tab and option to disable jQuery UI CSS

= 0.9.2 – 2014-11-24 =
* Fixed a bug preventing checkout registration

= 0.9.1 – 2014-11-04 =
* Fixed checkout fields CSS styles

= 0.9 – 2014-11-04 =
* Release!
