Description
The gform_mailchimp_lists_params filter in the Gravity Forms Mailchimp Add-On allows you to modify the request parameters when retrieving Mailchimp lists/audiences.
Usage
The following would apply to all forms.
add_filter( 'gform_mailchimp_lists_params', 'your_function_name' );
Parameters
| Parameter | Type | Description |
|---|---|---|
$params | array | Contains the parameters being sent. Defaults to array( 'start' => 0, 'limit' => 100 ). |
Examples
1. Increase limit
This example shows how you can increase the maximum number of lists/audiences that can be retrieved.
add_filter( 'gform_mailchimp_lists_params', function ( $params ) {
$params['limit'] = 200;
return $params;
} );
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?
Since
This filter was added in Gravity Forms version 3.0.
Source Code
This filter is located in class-gf-mailchimp.php.