WooCommerce admin settings options

Extending the WooCommerce Documentation page: https://woocommerce.com/document/settings-api/

'option_name' => array(
	'type' => 'title|sectionend|text|password|datetime|datetime-local|date|month|time|week|number|emailk|url|tel|color|textarea|radio|checkbox|select|multiselect|image_width|single_select_page|single_select_page_with_search|single_select_country|multi_select_countries|relative_date_selector', //Required
	'id'	 => 'Unique field ID',
	'title' => 'Title for your option shown on the settings page',
	'class' => 'Space separated classes for the input',
	'css' => 'Space and ; separated CSS rules added line to the input',
	'default' => 'Default value for the option',
	'desc' => 'Description for your option shown on the settings page',1
	'desc_tip' => 'Description for your option shown on the settings page',
	'placeholder' => 'Placeholder for the text field types',
	'suffix' => 'Content to place after text field field types',
	'value' => 'Do not set it as Woo will set it for you',
	'custom_attributes' => 'Array of type key => value that will be appended in the field construction sequence', //Eg. array( 'max' => '100', 'maxlength' => 3 )
	'label' => 'Label', // checkbox only
     	'options' => array(
          'key' => 'value'
     	) // array of options for select/multiselects only
);

to create your own type of field, there is an available action that takes in 1 parameter – $value

woocommerce_admin_field_{$type}

eg. usage:

add_action( 'woocommerce_admin_field_my_custom_type', 'my_custom_field_type', 10, 1 );
function my_custom_field_type( $value ) {
	echo '<field value="' . $value . '">Label</field>';
}