Conversation
WordPress Playground🚀 Your PR has been built and is ready for testing in WordPress Playground! |
n7studios
marked this pull request as ready for review
October 2, 2026 01:57
n7studios
requested review from
a team,
ciccio-kit and
noelherrick
and removed request for
a team
October 2, 2026 01:57
n7studios
marked this pull request as draft
October 2, 2026 02:46
This PR now only fixes Tag and Sequence only blocks creating inactive subscribers.
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.
Summary
Fixes Form Builder blocks with only a Tag and/or Sequence set (no Kit Form) creating subscribers as
inactive.#1084 creates the subscriber as
inactivewhen a Kit Form is specified, so the Form's double opt-in setting is honored, andactiveotherwise, as there's no double opt-in for Tags or Sequences. However, the block always outputs a hiddenform_idfield, which is0when no Form is selected. The check$form_id !== falsewas therefore always true, so every subscriber was created asinactive, including those from Tag or Sequence only blocks.Form, Tag and Sequence IDs are now cast to integers, and the subscriber is only created as
inactivewhen a Form ID is set. This restores the behaviour from before #1084 for Tag and Sequence only blocks, and matches the Contact Form 7, Forminator and WishList Member integrations, which only useinactivefor Forms.The behaviour when a Form is specified is unchanged.
Testing
New Integration tests in
BlockFormBuilderTest, mocking Kit API requests:testSubscriberInactiveWhenFormSpecified: the subscriber is created asinactiveand added to the Form.testSubscriberActiveWhenTagSpecified: the subscriber is created asactiveand tagged. Fails onmain.testSubscriberActiveWhenSequenceSpecified: the subscriber is created asactiveand added to the Sequence.PageBlockFormBuilderCest:testFormBuilderBlockWithTaggingEnabledandtestFormBuilderBlockWithSequenceEnablednow also assert the subscriber isactive.Checklist