Skip to content

Instantly share code, notes, and snippets.

@peterwilsoncc
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterwilsoncc/9357932 to your computer and use it in GitHub Desktop.
Save peterwilsoncc/9357932 to your computer and use it in GitHub Desktop.
Using the Mailchimp WP plugin in DEV mode with basic fields
<?php
function pwcc_mailchimp_fields( $fields ) {
unset ( $fields );
$fields = array (
0 => array (
"name" => "Email Address",
"req" => 1,
"field_type" => "email",
"public" => 1,
"show" => 1,
"order" => 1,
"default" => '',
"helptext" => '',
"size" => 25,
"tag" => "EMAIL",
"id" => 0
),
1 => array (
"name" => "First Name",
"req" => 1,
"field_type" => "text",
"public" => 1,
"show" => 1,
"order" => 2,
"default" => "",
"helptext" => "",
"size" => 25,
"tag" => "FNAME",
"id" => 1
),
2 => array (
"name" => "Last Name",
"req" => 1,
"field_type" => "text",
"public" => 1,
"show" => 1,
"order" => 3,
"default" => "",
"helptext" => "",
"size" => 25,
"tag" => "LNAME",
"id" => 2
)
);
return $fields;
}
add_filter ( 'mailchimp_dev_mode_fields', 'pwcc_mailchimp_fields');
function pwcc_mailchimp_groups( $groups ) {
$groups = array();
return $groups;
}
add_filter ( 'mailchimp_dev_mode_groups', 'pwcc_mailchimp_groups');
<?php
define('MAILCHIMP_DEV_MODE', true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment