Created
July 24, 2020 16:57
-
-
Save dparker1005/13ab3295d92818b3e46c53b0ca0268ba to your computer and use it in GitHub Desktop.
Creates a new merge field in Mailchimp if one doesn't already exist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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