v4 API: Support Adding Subscribers to Legacy Forms#674
Conversation
noelherrick
left a comment
There was a problem hiding this comment.
I'm fine with a bit of duplication, but perhaps we add a new method in the core library that subscribes to either a non-legacy or a legacy form? I think that could also reduce the number of tests you need to write since we can just test it in the library and then the consumers can just call it transparently.
I considered this, however this would involve an additional API call. Forms are cached by each Plugin via a resource class, and the core library won't know which resource class to reference (e.g. That aside, the concept of "subscribing" to a form / legacy form is from the v3 API, as there was no way to create a subscriber (unless subscribing to a tag or other resource). Now that the v4 API provides the ability to create a subscriber, I'd like to remove this concept of subscribing to a form in the Plugin (just not at the same time as migrating to the v4 API). All calls made to As such, this code exists to ensure we don't introduce breaking changes, but will later be deprecated and then removed. |
Summary
Uses this PR and some logic to call the applicable v4 API method, depending on whether the Plugin needs to add the subscriber to a Form or Legacy Form.
Testing
testSettingsContactForm7ToConvertKitLegacyFormMapping: Test that Contact Form 7 to Legacy Form subscribing/mapping workstestSettingsForminatorFormToConvertKitLegacyFormMapping: Test that Forminator to Legacy Form subscribing/mapping workstestSettingsWishListMemberLevelToConvertKitLegacyFormMapping: Test that WishList Member to Legacy Form subscribing/mapping worksChecklist