Mollie Feed Meta

Introduction

The Feed Object meta for the Mollie Add-on is an associative array containing the properties which determine how the add-on should process the form submission.

$feed['meta'] = array(
    'feedName' => 'Mollie Feed 1',
    'transactionType' => 'product',
    'paymentAmount' => 'form_total',
    'feed_condition_conditional_logic_object' => array(
        'conditionalLogic' => array(
            'actionType' => 'show',
            'logicType'  => 'all',
            'rules'      => array(
                0 => array(
                    'fieldId'  => '1',
                    'operator' => 'isnot',
                    'value'    => '',
                ),
            ),
        ),
    ),
    'feed_condition_conditional_logic' => '1',
    'billingInformation_first_name' => '',
    'billingInformation_last_name' => '',
    'billingInformation_email' => '',
    'billingInformation_address' => '',
    'billingInformation_address2' => '',
    'billingInformation_city' => '',
    'billingInformation_state' => '',
    'billingInformation_zip' => '',
    'billingInformation_country' => '',
    'conditionalLogic' => '',
);

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 feed.
transactionTypestringSpecifies the type of transaction.
paymentAmountstringDefines the payment amount.
Accepts form_total or Field ID.
feed_condition_conditional_logicbooleanEnables conditional logic to determine if the feed should run.
feed_condition_conditional_logic_objectarrayStores the conditional logic rules for the feed.
billingInformation_first_namestringSpecifies the field ID used to map the first name.
billingInformation_last_namestringSpecifies the field ID used to map the last name.
billingInformation_emailstringSpecifies the field ID used to map the email address.
billingInformation_addressstringSpecifies the field ID used to map the address.
billingInformation_address2stringSpecifies the field ID used to map the second address line.
billingInformation_citystringSpecifies the field ID used to map the city.
billingInformation_statestringSpecifies the field ID used to map the state.
billingInformation_zipstringSpecifies the field ID used to map the zip code.
billingInformation_countrystringSpecifies the field ID used to map the country.
conditionalLogicstringSpecifies the condition to determine if the feed should run.