Skip to content

Commit

Permalink
Merge pull request #137 from efc/dev
Browse files Browse the repository at this point in the history
Add filter for body parameter data
  • Loading branch information
dparker1005 authored Mar 8, 2024
2 parents 3a0d9e8 + 492452f commit 631a1fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions classes/class-pmpromc-mailchimp-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ public function update_audience_members( $audience = '', $updates = [] ) {
'members' => $updates,
'update_existing' => true,
);
/**
* Filter the body parameter sent to the "update audience members" endpoint.
*
* @since TBD
*
* @param object $data The data to send to the Mailchimp API.
* @param string $audience The audience ID being updated.
*
* @return object The data to send to the Mailchimp API.
*/
$data = apply_filters( 'pmpromc_update_audience_members_data', $data, $audience );
$url = self::$api_url . "/lists/{$audience}";
$args = array(
'method' => 'POST', // Allows us update a user ID
Expand Down

0 comments on commit 631a1fd

Please sign in to comment.