Options are special form fields which a customer can interact with. They are used to make a product customizable by the customer, give him an opportunity to add personalized information and calculate the price based on the information received through the options.
Probably most commonly used type of Option :) Adds a possibility to use simple text input, though with an opportunity to make it numeric field or decimal field or even use conditional validation logic (at the moment, this functionality is enabled for this Option only).
Adds a matrix-like table with a possibility to choose any value from it. The info about chosen column name, row name and the value in the intersection of the column and the row will be available in the cart item meta.
Option Settings Synchronization. Connect and Duplicate Functionalities
Every option has a state, it can be either 'synced' or 'not synced'. Option's state shows whether the current instance of Option is activated, i.e., actually works like a form field with its own name, or not.
This is how this setting looks like when you have just created an Option instance (i.e., dragged it from the builder panel and dropped to the builder content area):
⚠️ Not synced Option instances are just dummy copies. They do not work as form fields. They cannot be used neither in price calculation nor in fields conditional logic. They must be synced (activated) prior using as Options.
These are the ways to activate Option:
Save option's settings with a unique slug name to DB.
Choose "Connect" in Sync setting, click on the blue arrow icon in order to fetch Options of the same type available in the DB, click on "Submit" button (it will appear next to the select field).
First method is most suitable for creating completely new Option.
The second method is most suitable for re-using already created Option.
This is how Sync setting looks like when a certain Option instance is activated:
For developers: ID #123 is the ID of a custom post type post in WordPress.
Why all this sync stuff is ever needed?
There a couple of reasons for that:
Syncing basically means the process of creation of an Option object in DB (custom post type object in terms of WordPress).
To be able to keep a "master" copy of Option in DB and a bit different copies-instances of the Option in the products.
To be able to easily re-use Options in different products.
To be able to manage price-related settings of all the Option instances of the site in one place, instead of editing every instance one by one (this is future feature, it is not possible at the moment as "Options Manager" is not created yet).
The last question you may have is "Why I need Unsync button at all?". As you may already guessed, this button actually detaches an Option's instance (make it unsynchronized) from its "master" copy stored in DB. It may happen that you need to completely new Option based on the existing synced instance. Then you have to unsync this instance first, then you can add a unique slug and save to DB. ⚠️ Without detaching Option's instance, saving its settings with a new slug to DB will lead to overwriting connected "master" copy of the Option!