Brevo Feed Meta

Introduction

The Feed Meta object for the Brevo Add-On is an associative array with properties determining how the add-on should process the form submission.

$feed['meta'] = array(
    'feedName'                             => 'Brevo Feed 1',
    'brevoList'                            => '',
    'feed_condition_conditional_logic_object' => array(),
    'feed_condition_conditional_logic'     => '0',
    'brevoFieldMap_email'                  => '1',
    'brevoFieldMap_{key}'                  => '',
    'feedCondition'                        => '',
);

Usage

We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:

$conditional_logic_enabled = rgars( $feed, 'meta/feedCondition' );

if ( $conditional_logic_enabled ) {
    // Conditional logic is enabled for this feed.
    $logic_rules = rgars( $feed, 'meta/feed_condition_conditional_logic_object/conditionalLogic/rules' );
    foreach ( $logic_rules as $rule ) {
        // Process each conditional logic rule.
        $field_id  = rgar( $rule, 'fieldId' );
        $operator  = rgar( $rule, 'operator' );
        $value     = rgar( $rule, 'value' );
        // Example: Use $field_id, $operator, and $value in your logic.
    }
}

Properties

PropertyTypeDescription
feedNamestringA unique name for the Brevo feed.
brevoListstringThe Brevo List you would like to add your contacts to.
feed_condition_conditional_logic_objectarrayStores the conditional logic rules for the feed. Empty if no rules are defined.
feed_condition_conditional_logicbooleanDetermines whether conditional logic is enabled for the feed.
fieldMap_emailstringThe contact email in Brevo. Required
fieldMap_{key}stringReplace {key} with the name of the field that is mapped.
feedConditionstringSpecifies additional conditions for running the feed.