You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove deprecated Contact Form 7 and Ninja Forms popup actions - #1427
Removes Contact Form 7's deprecated "Popup Settings" editor tab (Close/Open Popup checkboxes + delay), its hidden-field settings injector, and its option-based save handler. CF7's own UI already flags this tab as "Deprecated," and it currently renders with a layout bug.
Trims the now-dead settings-parsing code out of the CF7/Ninja Forms frontend JS, while preserving the separate (still-supported, also-deprecated) cf7_form_success / ninja_form_success cookie-trigger event path — those keep working.
Updates Form_Integration_Query_Test.php to drop coverage for the removed CF7/Ninja Forms popup-list helpers, keeping the Gravity Forms assertions intact (Gravity Forms ships the equivalent feature and is intentionally out of scope here).
CF7
Ninja Forms
Priority
Low–medium. This is cleanup of dead/already-broken UI, not a behavioral fix for an active workflow. It doesn't touch any currently-recommended trigger/cookie flow, and Gravity Forms' equivalent (still active) feature isn't touched. The real risk surface is sites with existing forms that already have the legacy settings/actions saved — see below.
Testing done
✅ CF7 form editor — confirmed the "Popup Settings" tab no longer appears, no PHP notices on the form edit screen.
✅ Ninja Forms action list — confirmed "Open Popup" / "Close Popup" no longer appear under Installed Add-on Actions.
✅ Cookie-trigger popups (cf7_form_success / ninja_form_success) — confirmed these still fire correctly, since the JS still calls window.PUM.forms.success() on submission.
✅ Generic "close popup on form submission" popup setting — confirmed CF7 and Ninja Forms submissions inside a popup still close/redirect per that separate, unrelated setting.
Testing NOT done — please run before this goes live
⚠️Ninja Forms form with a pre-existing "Open Popup" or "Close Popup" action already attached (built before this change). Need to confirm submitting it doesn't throw a PHP fatal/warning now that NF_PUM_Actions_OpenPopup/ClosePopup no longer exist and aren't registered in Ninja_Forms()->actions.
⚠️CF7 form with the legacy Close/Open Popup checkboxes previously checked (its orphaned cf7_pum_{id} option still exists in wp_options). Need to confirm submitting it from inside a popup degrades silently — no error, just without the removed open/close side effect.
These two are the actual regression risk in this change; everything else is additive UI removal with no stored state to contend with.
Suggested migration plan for the above
If either case above turns up a problem (or even as a straightforward cleanup pass regardless), consider a one-time upgrade routine:
Ninja Forms: iterate existing forms' saved actions for type of closepopup/openpopup and strip those entries so stale references stop being processed/serialized at all. Log affected form IDs for site-owner visibility.
Contact Form 7: bulk-delete orphaned cf7_pum_% options (DELETE FROM {$wpdb->options} WHERE option_name LIKE 'cf7_pum_%') — nothing reads them anymore, so it's pure dead data.
This would fit the existing upgrade-routine pattern so it runs once per site on update, rather than needing per-site manual cleanup.
Remaining regression checks suggested before release
Next reviewer: please also exercise, in addition to the two ⚠️ items above:
Modern "Form Submission" conversion tracking still increments for CF7/NF submissions tied to a CTA/popup (unrelated code path, but shares the touched files — worth a sanity pass).
Gravity Forms' own Open/Close Popup feature (untouched, but shares the same pum-forms.js runtime) — confirm no collateral damage.
Browser console on pages with CF7/NF forms — no JS errors from the trimmed contactform7.js/ninjaforms.js.
Both integrations shipped a per-form "open/close popup on submit"
feature (CF7's Popup Settings editor tab; Ninja Forms' Open/Close
Popup actions) that is deprecated and, per CF7, broken in current
versions. Removes the admin UI, the settings persistence, and the
Ninja Forms action classes.
The separate (also deprecated but still functional) cf7_form_success
and ninja_form_success cookie-trigger events are left intact, so
JS still calls window.PUM.forms.success() on submission to preserve
that trigger path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Walkthrough
Contact Form 7 and Ninja Forms no longer use their removed popup settings and actions. Their JavaScript success handlers now pass false. Popup-list tests now check the Gravity Forms provider.
Changes
Form integration popup handling
Layer / File(s)
Summary
Remove Contact Form 7 popup settings includes/integrations/class-pum-cf7.php, assets/js/src/integration/contactform7.js
The integration no longer registers or implements popup editor settings. Its success handler now calls window.PUM.forms.success($form, false).
Remove Ninja Forms popup actions includes/integrations/class-pum-ninja-forms.php, includes/integrations/ninja-forms/Actions/*, assets/js/src/integration/ninjaforms.js, tests/php/tests/Form_Integration_Query_Test.php
The integration no longer registers its open and close actions. Its JavaScript handler no longer uses legacy action settings and calls window.PUM.forms.success($form, false). The popup-list tests now check Gravity Forms.
No actionable merge-blocking risk remains after the source and release-path review.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: removal of deprecated Contact Form 7 and Ninja Forms popup actions.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.
Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
ESLint
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
assets/js/src/integration/contactform7.js
ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.
assets/js/src/integration/ninjaforms.js
ESLint skipped: the matched ESLint configuration already failed (missing-dependency).
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
This branch has not been deployed
No deployments
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
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
cf7_form_success/ninja_form_successcookie-trigger event path — those keep working.Form_Integration_Query_Test.phpto drop coverage for the removed CF7/Ninja Forms popup-list helpers, keeping the Gravity Forms assertions intact (Gravity Forms ships the equivalent feature and is intentionally out of scope here).CF7

Ninja Forms

Priority
Low–medium. This is cleanup of dead/already-broken UI, not a behavioral fix for an active workflow. It doesn't touch any currently-recommended trigger/cookie flow, and Gravity Forms' equivalent (still active) feature isn't touched. The real risk surface is sites with existing forms that already have the legacy settings/actions saved — see below.
Testing done
cf7_form_success/ninja_form_success) — confirmed these still fire correctly, since the JS still callswindow.PUM.forms.success()on submission.Testing NOT done — please run before this goes live
NF_PUM_Actions_OpenPopup/ClosePopupno longer exist and aren't registered inNinja_Forms()->actions.cf7_pum_{id}option still exists inwp_options). Need to confirm submitting it from inside a popup degrades silently — no error, just without the removed open/close side effect.These two are the actual regression risk in this change; everything else is additive UI removal with no stored state to contend with.
Suggested migration plan for the above
If either case above turns up a problem (or even as a straightforward cleanup pass regardless), consider a one-time upgrade routine:
typeofclosepopup/openpopupand strip those entries so stale references stop being processed/serialized at all. Log affected form IDs for site-owner visibility.cf7_pum_%options (DELETE FROM {$wpdb->options} WHERE option_name LIKE 'cf7_pum_%') — nothing reads them anymore, so it's pure dead data.This would fit the existing upgrade-routine pattern so it runs once per site on update, rather than needing per-site manual cleanup.
Remaining regression checks suggested before release
Next reviewer: please also exercise, in addition to the two⚠️ items above:
pum-forms.jsruntime) — confirm no collateral damage.contactform7.js/ninjaforms.js.🤖 Generated with Claude Code
Summary by CodeRabbit