Skip to main content

fc_select2_field_types

Type: Filter

Filters the select2 field types.

Signature​

apply_filters( 'fc_select2_field_types', $types );

Parameters​

NameTypeDescription
$typesarrayList of values to filter.

Since​

  • 1.5.0

Source: inc/checkout-fields.php

Examples​

add_filter( 'fc_select2_field_types',
/**
* Remove country field type from select2.
*
* @param array $types List of values to filter.
* @return array Filtered value.
*/
function( $types ) {
// Remove 'country' from the array
$types = array_diff( $types, array( 'country' ) );
return $types;
},
10
);