{"id":7005,"date":"2009-10-28T16:39:15","date_gmt":"2009-10-28T16:39:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/mailchimp-framework\/"},"modified":"2009-10-28T16:39:15","modified_gmt":"2009-10-28T16:39:15","slug":"mailchimp-framework","status":"closed","type":"plugin","link":"https:\/\/cs.wordpress.org\/plugins\/mailchimp-framework\/","author":140668,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"trunk","tested":"2.9.2","requires":"2.8","requires_php":"","requires_plugins":"","header_name":"MailChimp Framework","header_author":"Aaron D. Campbell","header_description":"","assets_banners_color":"","last_updated":"2009-10-28 16:39:15","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_xclick&business=paypal%40xavisys%2ecom&item_name=MailChimp%20Framework&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8","header_plugin_uri":"http:\/\/xavisys.com\/2009\/09\/wordpress-mailchimp-framework\/","header_author_uri":"http:\/\/xavisys.com\/","rating":0,"author_block_rating":0,"active_installs":30,"downloads":9156,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1029],"plugin_category":[],"plugin_contributors":[78311],"plugin_business_model":[],"class_list":["post-7005","plugin","type-plugin","status-closed","hentry","plugin_tags-mailchimp","plugin_contributors-aaroncampbell","plugin_committers-aaroncampbell"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/mailchimp-framework.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugins gives you a great framework to use for integrating with MailChimp.<\/p>\n\n<p>Requires PHP5.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Verify that you have PHP5, which is required for this plugin.<\/li>\n<li>Upload the whole <code>mailchimp-framework<\/code> directory to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How do I send a request to MailChimp?<\/dt>\n<dd><p>The most basic form of communication with MailChimp is a simple ping to check the status of MailChimp.  To send one simply use this code:<\/p>\n\n<pre><code>\/\/ Instantiate our class\n$wpMailChimpFramework = wpMailChimpFramework::getInstance();\n\n\/\/ Send the ping and echo the results\necho wpMailChimpFramework-&gt;ping();\n<\/code><\/pre><\/dd>\n<dt>How do I send a request my current lists from MailChimp?<\/dt>\n<dd><p>Requesting your lists is easy, just use this code:<\/p>\n\n<pre><code>\/\/ Instantiate our class\n$wpMailChimpFramework = wpMailChimpFramework::getInstance();\n\n\/\/ Request the lists and var_dump so we can see them\n$lists = $this-&gt;lists();\nvar_dump($lists);\n<\/code><\/pre>\n\n<p>Here is what you can expect to see:<\/p>\n\n<pre><code>array(2) {\n  [0]=&gt;\n  object(stdClass)#140 (12) {\n    [\"id\"]=&gt;\n    string(10) \"xx55x5555x\"\n    [\"web_id\"]=&gt;\n    int(55555)\n    [\"name\"]=&gt;\n    string(21) \"Your Most Recent List\"\n    [\"date_created\"]=&gt;\n    string(19) \"2009-04-03 14:21:43\"\n    [\"member_count\"]=&gt;\n    int(1)\n    [\"unsubscribe_count\"]=&gt;\n    int(0)\n    [\"cleaned_count\"]=&gt;\n    int(0)\n    [\"email_type_option\"]=&gt;\n    bool(false)\n    [\"default_from_name\"]=&gt;\n    string(14) \"Some From Name\"\n    [\"default_from_email\"]=&gt;\n    string(19) \"example@example.com\"\n    [\"default_subject\"]=&gt;\n    string(0) \"\"\n    [\"default_language\"]=&gt;\n    string(3) \"eng\"\n  }\n  [1]=&gt;\n  object(stdClass)#132 (12) {\n    [\"id\"]=&gt;\n    string(10) \"5555555xx5\"\n    [\"web_id\"]=&gt;\n    int(555556)\n    [\"name\"]=&gt;\n    string(15) \"Your Older List\"\n    [\"date_created\"]=&gt;\n    string(19) \"2009-08-01 19:10:06\"\n    [\"member_count\"]=&gt;\n    int(9)\n    [\"unsubscribe_count\"]=&gt;\n    int(0)\n    [\"cleaned_count\"]=&gt;\n    int(0)\n    [\"email_type_option\"]=&gt;\n    bool(false)\n    [\"default_from_name\"]=&gt;\n    string(7) \"Xavisys\"\n    [\"default_from_email\"]=&gt;\n    string(19) \"example@example.com\"\n    [\"default_subject\"]=&gt;\n    string(20) \"Some Default Subject\"\n    [\"default_language\"]=&gt;\n    string(3) \"eng\"\n  }\n}\n<\/code><\/pre><\/dd>\n<dt>How do I send a request my current campaigns from MailChimp?<\/dt>\n<dd><p>Requesting your campaigns is easy, just use this code:<\/p>\n\n<pre><code>\/\/ Instantiate our class\n$wpMailChimpFramework = wpMailChimpFramework::getInstance();\n\n\/\/ Request the campaigns and var_dump so we can see them\n$campaigns = $this-&gt;campaigns();\nvar_dump($campaigns);\n<\/code><\/pre>\n\n<p>Here is what you can expect to see:<\/p>\n\n<pre><code>array(2) {\n  [0]=&gt;\n  object(stdClass)#211 (22) {\n    [\"id\"]=&gt;\n    string(10) \"xxxxxx42xx\"\n    [\"web_id\"]=&gt;\n    int(646505)\n    [\"list_id\"]=&gt;\n    string(10) \"xx55x5555x\"\n    [\"folder_id\"]=&gt;\n    int(0)\n    [\"title\"]=&gt;\n    string(21) \"Test Newsletter Title\"\n    [\"type\"]=&gt;\n    string(7) \"regular\"\n    [\"create_time\"]=&gt;\n    string(19) \"2009-10-18 22:18:08\"\n    [\"send_time\"]=&gt;\n    NULL\n    [\"status\"]=&gt;\n    string(4) \"save\"\n    [\"from_name\"]=&gt;\n    string(14) \"Some From Name\"\n    [\"from_email\"]=&gt;\n    string(19) \"example@example.com\"\n    [\"subject\"]=&gt;\n    string(23) \"Test Newsletter Subject\"\n    [\"to_email\"]=&gt;\n    NULL\n    [\"archive_url\"]=&gt;\n    string(22) \"http:\/\/eepurl.com\/xxxx\"\n    [\"emails_sent\"]=&gt;\n    int(0)\n    [\"inline_css\"]=&gt;\n    string(1) \"N\"\n    [\"analytics\"]=&gt;\n    string(6) \"google\"\n    [\"analytics_tag\"]=&gt;\n    string(23) \"my_google_analytics_key\"\n    [\"track_clicks_text\"]=&gt;\n    bool(false)\n    [\"track_clicks_html\"]=&gt;\n    bool(true)\n    [\"track_opens\"]=&gt;\n    bool(true)\n    [\"segment_opts\"]=&gt;\n    array(0) {\n    }\n  }\n  [1]=&gt;\n  object(stdClass)#210 (22) {\n    [\"id\"]=&gt;\n    string(10) \"x52x1x00xx\"\n    [\"web_id\"]=&gt;\n    int(646449)\n    [\"list_id\"]=&gt;\n    string(10) \"xx55x5555x\"\n    [\"folder_id\"]=&gt;\n    int(0)\n    [\"title\"]=&gt;\n    string(21) \"Test Newsletter Title\"\n    [\"type\"]=&gt;\n    string(7) \"regular\"\n    [\"create_time\"]=&gt;\n    string(19) \"2009-10-18 22:07:15\"\n    [\"send_time\"]=&gt;\n    NULL\n    [\"status\"]=&gt;\n    string(4) \"save\"\n    [\"from_name\"]=&gt;\n    string(14) \"Some From Name\"\n    [\"from_email\"]=&gt;\n    string(19) \"example@example.com\"\n    [\"subject\"]=&gt;\n    string(23) \"Test Newsletter Subject\"\n    [\"to_email\"]=&gt;\n    NULL\n    [\"archive_url\"]=&gt;\n    string(22) \"http:\/\/eepurl.com\/xxxx\"\n    [\"emails_sent\"]=&gt;\n    int(0)\n    [\"inline_css\"]=&gt;\n    string(1) \"N\"\n    [\"analytics\"]=&gt;\n    string(6) \"google\"\n    [\"analytics_tag\"]=&gt;\n    string(23) \"my_google_analytics_key\"\n    [\"track_clicks_text\"]=&gt;\n    bool(false)\n    [\"track_clicks_html\"]=&gt;\n    bool(true)\n    [\"track_opens\"]=&gt;\n    bool(true)\n    [\"segment_opts\"]=&gt;\n    array(0) {\n    }\n  }\n}\n<\/code><\/pre><\/dd>\n<dt>How do I create a campaign in MailChimp?<\/dt>\n<dd><p>Creating a campaign is slightly more complicated, but here is the code:<\/p>\n\n<pre><code>\/\/ Instantiate our class\n$wpMailChimpFramework = wpMailChimpFramework::getInstance();\n\n$ccParams = array();\n$ccParams['type'] = 'regular';\n\n$ccParams['options']['list_id'] = 'cc55x5555xs';\n$ccParams['options']['subject'] = 'Test Newsletter Subject';\n$ccParams['options']['from_email'] = 'example@example.com';\n$ccParams['options']['from_name'] = 'Xavisys - Repurposed Marketing';\n\n$ccParams['options']['tracking']=array('opens' =&gt; true, 'html_clicks' =&gt; true, 'text_clicks' =&gt; false);\n\n$ccParams['options']['authenticate'] = true;\n$ccParams['options']['analytics'] = array('google'=&gt;'my_google_analytics_key');\n$ccParams['options']['title'] = 'Test Newsletter Title';\n\n$ccParams['content'] = array(\n    'html'=&gt;'some pretty html &lt;a href=\"http:\/\/xavisys.com\"&gt;Xavisys&lt;\/a&gt; content *|UNSUB|* message',\n    'text' =&gt; 'text http:\/\/xavisys.com text text *|UNSUB|*'\n);\n\/*\n\/\/ OR use a template\n$ccParams['content'] = array(\n    'html_main'=&gt;'some pretty html content',\n    'html_sidecolumn' =&gt; 'this goes in a side column',\n    'html_header' =&gt; 'this gets placed in the header',\n    'html_footer' =&gt; 'the footer with an *|UNSUB|* message',\n    'text' =&gt; 'text content text content *|UNSUB|*'\n);\n$ccParams['options']['template_id'] = \"1\";\n*\/\n\n\/\/ Create the Campaign and var_dump so we can see the result\n$campaign = $wpMailChimpFramework-&gt;campaignCreate($ccParams);\nvar_dump($campaign);\n<\/code><\/pre>\n\n<p>Here is what you can expect to see:<\/p>\n\n<pre><code>array(1) {\n  [\"id\"]=&gt;\n  string(10) \"xxx0x078xx\"\n}\n<\/code><\/pre><\/dd>\n<dt>How do I send a test campaign?<\/dt>\n<dd><p>To test a campaign without actually sending it (each campaign can only be sent once), use this code:<\/p>\n\n<pre><code>\/\/ Instantiate our class\n$wpMailChimpFramework = wpMailChimpFramework::getInstance();\n\n$campaignTestParam = array(\n    'cid'           =&gt; 'xxx0x078xx',\n    'test_emails'   =&gt; array(\n        'example@example.com',\n        'example2@example.com',\n    )\n);\n\n\/\/ Send the test campaign and var_dump so we can see the result\n$campaign = $wpMailChimpFramework-&gt;campaignSendTest($campaignTestParam);\nvar_dump($campaign);\n<\/code><\/pre>\n\n<p>Here is what you can expect to see:<\/p>\n\n<pre><code>bool(true)\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Original version released to wordpress.org repository<\/li>\n<\/ul>","raw_excerpt":"MailChimp integration framework and admin interface as well as WebHook listener.  Requires PHP5.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/7005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"author":[{"embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/users\/140668"}],"replies":[{"embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=7005"}],"wp:attachment":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=7005"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=7005"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=7005"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=7005"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=7005"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=7005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}