Skip to content

Add form builder check before loading stripe scripts#3163

Merged
Crabcyborg merged 1 commit into
masterfrom
add_form_builder_check_before_loading_stripe_scripts
Jun 19, 2026
Merged

Add form builder check before loading stripe scripts#3163
Crabcyborg merged 1 commit into
masterfrom
add_form_builder_check_before_loading_stripe_scripts

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Prevents this doing it wrong message I see in the form builder and settings pages.

Function WP_Scripts::add was called incorrectly. The script with the handle "formidable-stripe" was enqueued with dependencies that are not registered: formidablepro.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed gateway field display issues when editing forms in the form builder.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 174ac537-57a8-4202-bb46-339b5be48585

📥 Commits

Reviewing files that changed from the base of the PR and between c19d770 and 4825647.

📒 Files selected for processing (1)
  • stripe/controllers/FrmTransLiteActionsController.php

📝 Walkthrough

Walkthrough

A guard is added at the top of hide_gateway_field_on_front_end() in FrmTransLiteActionsController. When FrmAppHelper::is_form_builder_page() returns true, the method returns $values immediately, bypassing all gateway-field hiding and loading logic.

Changes

Form Builder Guard for Gateway Field Hiding

Layer / File(s) Summary
Early-return guard in hide_gateway_field_on_front_end()
stripe/controllers/FrmTransLiteActionsController.php
Inserts a check for FrmAppHelper::is_form_builder_page() that returns $values early, preventing gateway field hiding/loading from executing on the form builder page.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Hippity-hop, the builder's in view,
No hiding of gateways — we let it pass through!
A quick little check, just six lines of grace,
Keeps the form builder tidy, a most peaceful place.
The rabbit hops on, with a wink and a grin~ ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the main change: adding a form builder check before loading Stripe scripts to prevent the script enqueue error described in the PR objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add_form_builder_check_before_loading_stripe_scripts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@deepsource-io

deepsource-io Bot commented Jun 19, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in c19d770...4825647 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Jun 19, 2026 1:33p.m. Review ↗
JavaScript Jun 19, 2026 1:33p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@Crabcyborg
Crabcyborg merged commit 06ed963 into master Jun 19, 2026
48 checks passed
@Crabcyborg
Crabcyborg deleted the add_form_builder_check_before_loading_stripe_scripts branch June 19, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant