experience/mailchimp_subscribe.ee_addon — pull request #2 by rsanchez (2012-05-04 22:44:35+00:00)
Title: added ability for third parties to use this piece

This is an attempt to make this more extensible, so you don't have to add custom integration with every addon under the sun. With this, I can add custom integration in my addon to yours, rather than vice versa.

Summary:
added hook mailchimp_subscribe_member_fields - this effects the fields dropdown in the settings
added a flag to cancel the mailchimp subscription in member_member_register (so that I can perform it myself later) - $this->_ee->session->cache['mailchimp_subscribe']['cancel_subscription']
changed the mailchimp_model->_update_member_subscriptions to accept an array of member data instead of just the member way (so that I may provide a custom data payload instead of one you fetch based on member id)

In my addon (profile:edit), after I perform my registration:

```php
$this->EE->load->add_package_path(PATH_THIRD.'mailchimp_subscribe/');
$this->EE->load->model('mailchimp_model');
$this->EE->mailchimp_model->subscribe_member(array(
'member_id' => 1, //etc.
));
```