[BUG] ACF field type
-
Hi! My team recently came across a bug due to how the new table field is registered.
Issue:
Currently, when the new field is registered to ACF, it registers it as a stdObject. If you inspect all the other fields, they are registered as their class type. Such as acf_field_text, acf_field_select, etc..In your plugin you instantiate your class directly with: new acf_field_table();
This then calls the __constructor() method on the acf_field class, which then calls acf_register_field_type_info() which ends up creating the stdObject.Fix:
This can be fixed by registering the plugin using the same function that the other fields are registered with:
acf_register_field_type( ‘acf_field_table’ );This ACF function will register your field correctly and will be seen by ACF as an acf_field_table type.
Summary:
Can you please change the way you register the field by replacing:
new acf_field_table();
with:
acf_register_field_type( ‘acf_field_table’ );Happy to go into further details if you would like.
Thanks!
- The topic ‘[BUG] ACF field type’ is closed to new replies.