Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creates a new merge field in Mailchimp if one doesn't already exist.
<?php
// Copy from below here...
/*
* Creates a new merge field in Mailchimp if one doesn't already exist.
*/
function my_pmpro_mailchimp_merge_fields( $merge_fields ) {
// Adds a "COMPANY" merge field to Mailchimp.
$merge_fields[] = array('name' => 'COMPANY', 'type' => 'text');
return $merge_fields;
}
add_filter( 'pmpro_mailchimp_merge_fields', 'my_pmpro_mailchimp_merge_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment