bookmark_bordergform_campaignmonitor_override_subscriber

Description

This filter can be used to modify the subscriber parameters before they are sent to Campaign Monitor.

Usage

The filter which would run for all Campaign Monitor feeds can be used like so:

add_filter( 'gform_campaignmonitor_override_subscriber', 'your_function_name', 10, 4 );

Parameters

  • $subscriber array

    An associative array containing all the parameters to be passed to Campaign Monitor.

  • $form

    The Form which is currently being processed.

  • $entry Entry Object

    The Entry which is currently being processed.

  • $feed Feed Object

    The Feed which is currently being processed.

Examples

1. Add RestartSubscriptionBasedAutoresponders parameter

This example shows how you can add the RestartSubscriptionBasedAutoresponders parameter to the subscriber array.

add_filter( 'gform_campaignmonitor_override_subscriber', function ( $subscriber, $entry, $form, $feed ) {
    $subscriber['RestartSubscriptionBasedAutoresponders'] = true;

    return $subscriber;
}, 10, 4 );

Placement

Your code snippet should be placed in the functions.php file of your active theme.

Source Code

apply_filters( 'gform_campaignmonitor_override_subscriber', $subscriber, $entry, $form, $feed )

This filter is located in GFCampaignMonitor::export_feed() in class-gf-campaignmonitor.php