Skip to content

Fix: Form Builder: Tag and add to Sequence when adding to Form fails - #1213

Draft
n7studios wants to merge 2 commits into
fix-form-builderfrom
fix-form-builder-subscriber-id
Draft

n7studios wants to merge 2 commits into
fix-form-builderfrom
fix-form-builder-subscriber-id

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Fixes the Form Builder block not tagging the subscriber or adding them to the Sequence when adding the subscriber to the Form failed.

After creating the subscriber, $result was overwritten by the add to Form request. The Tag and Sequence requests then read the subscriber ID from $result['subscriber']['id']. If the Form request failed, $result was a WP_Error, so the subscriber ID was missing and the Tag and Sequence requests failed.

The subscriber ID is now stored once, after the subscriber is created, and used for the Form, Tag and Sequence requests.

Testing

New Integration test in BlockFormBuilderTest:

  • testTagAndSequenceWhenAddingSubscriberToFormFails: mocks the add to Form request returning an error, and confirms the subscriber is still tagged and added to the Sequence. Fails without this fix.

Checklist

@n7studios n7studios added this to the 3.4.6 milestone Oct 2, 2026
@n7studios n7studios self-assigned this Oct 2, 2026
@n7studios n7studios added the bug label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 participant