gravityflow_assignee_ajax_search

Description

The gravityflow_assignee_ajax_search filter allows customization of AJAX-powered search for assignee list in workflow step and conditional routing settings. When enabled, assignee searches will be required for sites that have more than 150 users to fetch results rather than loading all WP Users. All roles and email fields will be visible prior to search.

The filter is often used in conjunction with gravityflow_assignee_ajax_search_account_threshold to customize the default 150 user limit. The hook applies to all workflow step that require assignee selection including the PDF Generator Extension.

Parameters

ParameterTypeDetails
$enabledBooleanWhether AJAX search is enabled. Default true

Examples

Disable AJAX search if number of accounts is less than 2500 while the site has more than 2000 users. This means, only the first 150 will load due to the default defined in gravityflow_assignee_ajax_search_account_threshold

add_filter( 'gravityflow_assignee_ajax_search', '__return_false' );

AJAX turned off for Select Assignees

Ajax turned off for Conditional Routing

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?