Unable to select custom fields in FiboSearch settings

If the wp_postmeta table in your database is large, the SQL query used by FiboSearch to retrieve a list of custom fields can be slow or even fail, preventing the list from being displayed in the settings. To resolve this issue, you can disable the query and manually add the custom fields.

Disabling the query

To disable the SQL query that fetches the custom fields list, add the following code to your website:

add_filter( 'dgwt/wcas/indexer/skip_querying_searchable_custom_fields', '__return_true' );

Learn how to add this snippet to your WordPress.

Adding custom fields manually

Once the query is disabled, you will need to manually add the custom fields you wish to search. Use this code snippet:

add_filter( 'dgwt/wcas/indexer/searchable_custom_fields', function( $customFields ) {
   $customFields[] = array(
       'label' => 'my-custom-field',
       'key' => 'my-custom-field'
   );

   return $customFields;
} );

Learn how to add this snippet to your WordPress.

After adding this code, you will be able to select the my-custom-field in the FiboSearch settings:

Add custom fields manually in FiboSearch settings