gform_brevo_request_args

Description

The gform_brevo_request_args filter allows modification of the request arguments before sending to the Brevo API.

Usage

add_filter( 'gform_brevo_request_args', 'your_function_name', 10, 2 );
ParameterTypeDescription
$argsarrayThe request arguments sent to Brevo.
$pathstringThe request path.

Examples

Add contact to multiple Brevo lists from single feed.

This examples adds the contact to both the list set in the feed and to list with ID 17.

add_filter( 'gform_brevo_request_args', function( $args, $path ) {

    $args['listIds'] = array( $args['listIds'][0], 17 );

    return $args;

}, 10, 2 );

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 Brevo version 1.0.

Source Code

This filter is located in gravityformsbrevo/includes/api/class-gf-brevo-api.php