Created
May 17, 2024 19:57
-
-
Save rocketgeek/026cfde1a2ab8e63ab021e15ba69b166 to your computer and use it in GitHub Desktop.
Add a mailchimp user to a segment
This file contains hidden or 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 | |
// @link https://mailchimp.com/developer/marketing/api/list-segments/ | |
$segment_id = '123'; // The segment ID | |
$user_email = ''; | |
wpmem_mc_query_api_lists( | |
'post', | |
array( 'segments', $segment_id, 'members' ), | |
array( 'email_address' => $user_email ) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment