Skip to content

MailchimpLists->updateSegment() has Improper Parameters #58

@collinhaines

Description

@collinhaines

According to the documentation for adding/removing users to a static segment the parameters members_to_add and members_to_remove are the only (optional) parameters to be used towards this execution.

The only assured parameter is the name of the segment - which should only be passed in when creating a new segment.

I've noticed this using Drupal 7.55 and MailChimp 7.x-4.8.

When attempting to rewrite the mailchimp_segment_batch_add_subscribers() function to have the proper parameters as specified in the above documentation I was returned with zero errors and zero successes.

Logging Mailchimp->handleRequest() returns the following:

Method: PATCH

URI: 'https://us15.api.mailchimp.com/3.0/lists/{list_id redacted}/segments/{segment_id redacted}'

Options:
Array
(
    [headers] => Array
        (
            [Authorization] => apikey {api_key redacted}
        )

    [json] => stdClass Object
        (
            [members_to_add] => Array
                (
                    [0] => {valid email redacted}
                )
            [name] => Freddie's peeps
        )
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions