Remove Legacy Forms from Settings Dropdowns - #1152
Open
n7studios wants to merge 5 commits into
Open
Conversation
WordPress Playground🚀 Your PR has been built and is ready for testing in WordPress Playground! |
n7studios
requested review from
a team,
ciccio-kit and
noelherrick
and removed request for
a team
July 30, 2026 08:37
n7studios
marked this pull request as ready for review
July 30, 2026 08:38
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
Removes legacy Kit forms from every settings dropdown across the plugin, while preserving any legacy form ID already saved to a post, page, category, block, integration mapping or plugin setting.
Legacy forms are a deprecated Kit resource. New assignments should always be to v4 forms, but existing customers who already have legacy forms selected should continue to work at this time - both at render time and in the admin UI, where the saved legacy form should still show as the currently-selected dropdown option rather than silently reverting to "None".
Testing
Tests added:
Integration (
tests/Integration/ResourceFormsTest.php):testGetNonLegacy—get_non_legacy()returns v4 forms and excludes legacy; every returned form has aformatkeytestNonLegacyExist— helper returns true when at least one v4 form existstestGetSelectFieldAllExcludesLegacyForms— rendered HTML has no<option>for the legacy form when a v4 form is the selected valuetestGetSelectFieldAllPreservesSelectedLegacyForm— when a legacy form ID is the selected value, the option is appended and marked selectedEnd-to-end:
SelectOptionOrderCest::testLegacyFormsExcludedFromDropdowns— no legacy<option>in Post metabox, Page metabox, Category term Add, Settings > Kit > GeneralSelectOptionOrderCest::testPreservesSelectedLegacyFormInDefaultFormsSetting— Settings > Kit > General with a legacy form pre-assigned still shows it as selectedSelectOptionOrderCest::testPreservesSelectedLegacyFormOnCategoryTerm— Category term with a legacy form in term meta still shows it as selectedSelectOptionOrderCest::testPreservesSelectedLegacyFormOnPostMetabox— Post with a legacy form in post meta still shows it as selected in the classic-editor metaboxPageBlockFormCest::testFormBlockSidebarDropdownExcludesLegacyForms— Kit Form block sidebar Form dropdown has no legacy optionPageBlockFormCest::testFormBlockPreservesSelectedLegacyForm— Kit Form block preseeded with a legacyformattribute still shows it as selected in the sidebar AND renders on the frontendPageBlockFormBuilderCest::testFormBuilderBlockSidebarFormDropdownExcludesLegacyForms— Form Builder block sidebarform_iddropdown has no legacy optionPageBlockFormBuilderCest::testFormBuilderBlockPreservesSelectedLegacyForm— Form Builder block preseeded with a legacyform_idattribute still shows it as selected in the sidebarBlockEditorFormCest::testPluginSidebarFormDropdownExcludesLegacyForms— Gutenberg plugin sidebar Form dropdown has no legacy option across page, post, articleBlockEditorFormCest::testPluginSidebarPreservesSelectedLegacyForm— Page with a legacy form in post meta still shows it as selected in the Gutenberg plugin sidebarTests removed (all previously selected a legacy form via a dropdown, which the dropdown no longer offers):
PageBlockFormCest::testFormBlockWithValidLegacyFormParameterPageBlockFormBuilderCest::testFormBuilderBlockWithLegacyFormEnabledClassicEditorFormCest::testAddNewPostTypeUsingDefinedLegacyFormBlockEditorFormCest::testAddNewPostTypeUsingDefinedLegacyFormWidgetFormCest::testLegacyFormWidgetWithValidLegacyFormParameterWidgetFormCest::testBlockFormBlockWithValidLegacyFormParameterEditFormLinkCest::testEditFormLinkOnPageWithLegacyFormContactForm7FormCest::testSettingsContactForm7ToKitLegacyFormMappingForminatorCest::testSettingsForminatorFormToKitLegacyFormMappingWishListMemberCest::testWLMToKitLegacyFormMappingOnLevelAddedWishListMemberCest::testWLMToKitLegacyFormMappingOnLevelRemovedElementorFormCest::testFormWidgetWithValidLegacyFormParameterDiviPluginFormCest::testFormModuleWithValidLegacyFormParameterDiviThemeFormCest::testFormModuleWithValidLegacyFormParameterChecklist