class MyACFSelectField {
public function __construct() {
add_filter('acf/load_field/name=my_select_field', array($this, 'filter_select_options'));
}
public function filter_select_options($field) {
// Modify the options of the select field here
$field['choices'] = array(
'option_1' => 'Option 1',
'option_2' => 'Option 2',
'option_3' => 'Option 3'
);
return $field;
}
}
new MyACFSelectField();