Repository navigation
feat(mailerlite): set subscriber status and resubscribe from the field map - #359
Open
matiasqueroceballos wants to merge 1 commit into
Open
matiasqueroceballos wants to merge 1 commit into
matiasqueroceballos wants to merge 1 commit into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Signups sent to MailerLite Classic could end up Unconfirmed because no
`type` was sent and the account's double opt-in decided. The group
endpoint accepts `type` and `resubscribe`, so expose them as virtual
fields in the field map, set with a fixed value ("Add Custom Value").
Nothing is sent unless mapped, so existing feeds are unchanged. Invalid
values are ignored. Logic stays inside CRMLIB_Mailerlite, so every form
integration gets it. Adds the formscrm_mailerlite_subscriber filter.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
matiasqueroceballos
force-pushed
the
fix/mailerlite-subscriber-status
branch
from
November 26, 2026 08:18
7785c61 to
5992e1f
Compare
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
davidperezgar
approved these changes
Nov 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Support thread: https://wordpress.org/support/topic/mailerlite-subscriber-status-unconfirmed/
Some signups sent to MailerLite Classic end up as Unconfirmed. The plugin only sent
emailandfields, so MailerLite decided the status (the account's double opt-in setting). There was no way to force it.Change
All inside
CRMLIB_Mailerlite, so it works for every form integration without touching common code.active,unconfirmed,unsubscribed) and Resubscribe (true/false). They are set with a fixed value (Add Custom Value / Custom value).typeandresubscribeare sent at the top level of the payload, as the Classic API documents forPOST /groups/{id}/subscribers.formscrm_mailerlite_subscriberto change the payload.formscrm_subscriber_*) so they never collide with MailerLite custom field keys.Not covered
activeprobably avoids them, but that is untested.Testing
tests/Unit/test-mailerlite.php(payload unchanged without options, top-leveltype/resubscribe, invalid values ignored, filter, field map). Not run locally (no MySQL/test-lib); relying on CI.🤖 Generated with Claude Code