Skip to content

Commit

Permalink
Clarified logic for double opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellGarceau committed Jan 9, 2025
1 parent f30dc64 commit 01c00b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mailchimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,9 @@ function mailchimp_sf_subscribe_body( $merge, $igs, $email_type, $email, $status
return $body;
}

// Subscribe the user immediately unless double opt-in is enabled
// No need to check user $status because we're handling that before this point
// Subscribe the email immediately unless double opt-in is enabled
// "unsubscribed" and "subscribed" existing emails have been excluded at this stage
// "pending" emails should follow double opt-in rules
$body->status = $double_optin ? 'pending' : 'subscribed';

return $body;
Expand Down

0 comments on commit 01c00b9

Please sign in to comment.