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
I'm noticing this bug with the new payment action changes.
When I create a legacy PayPal action and save, it would create a second legacy PayPal action.
It looks like changing option name here as well fixes it.
Summary by CodeRabbit
Bug Fixes
Fixed namespace collision between legacy PayPal actions and PayPal add-on actions, ensuring each maintains its own separate option storage and preventing data conflicts between the two payment systems.
The PR modifies the legacy PayPal action constructor to recalculate its option_name based on the new id_base value, ensuring the action uses a distinct POST data/options namespace from the PayPal add-on action and avoiding collision.
The FrmDefPayPalLegacyAction constructor now explicitly sets option_name to frm_paypal-legacy_action after setting id_base, with clarifying comments explaining the namespace isolation from the PayPal add-on action.
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
Strategy11/formidable-forms#3108: Updates FrmFormActionsController to include paypal-legacy in the returned action lists when registered, complementing this PR's namespace fix.
Strategy11/formidable-forms#3106: Stops "PayPal Commerce" from appearing on the legacy action, aligning with this PR's goal of isolating the legacy PayPal action's namespace.
Poem
A rabbit hops through namespaces clear, paypal-legacy now holds its sphere—
No collision, no mix-up in sight,
Each action distinct, perfectly right! 🐰✨
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The title accurately describes the main change: fixing duplicate legacy PayPal actions created on save by correcting the namespace collision.
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 fix_duplicate_legacy_paypal_action_created_on_create
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.
We reviewed changes in 6bdea48...baf87dd on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
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.
The reason will be displayed to describe this comment to others. Learn more.
Access to an undefined property FrmDefPayPalLegacyAction::$option_name
This issue is raised when an attempt is made to access an undefined property.
This may not have been intended, and it is advisable to give the code another look to make sure the property is defined in the scope it is used in.
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.
I'm noticing this bug with the new payment action changes.
When I create a legacy PayPal action and save, it would create a second legacy PayPal action.
It looks like changing option name here as well fixes it.
Summary by CodeRabbit
Bug Fixes