Remove submit field from payment settings#2231
Conversation
WalkthroughThe pull request modifies the Changes
Suggested labels
Suggested reviewers
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
stripe/models/FrmTransLiteAction.php (1)
161-162: Update the@sinceversion placeholder.The
@sincetag contains a placeholder version "x.x". Please replace it with the actual version number where this feature is being introduced.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
stripe/models/FrmTransLiteAction.php(2 hunks)
🔇 Additional comments (2)
stripe/models/FrmTransLiteAction.php (2)
171-174: LGTM! Clean implementation of field skipping logic.The implementation properly handles skipping the submit field type from payment settings while maintaining backward compatibility. Good use of the
FrmSubmitHelper::FIELD_TYPEconstant and strict type comparison.Also applies to: 182-185
171-174: Verify impact on existing forms.While the implementation is backward compatible, let's verify that no existing forms rely on submit fields in their payment settings.
✅ Verification successful
Submit field exclusion from payment settings is safe
The implementation is safe and logical as submit fields are only used for form submission control, not for payment processing. Payment calculations are handled through price fields, and submit buttons only manage form submission state.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any payment actions that might reference submit fields echo "Searching for potential submit field references in payment actions..." rg -l "FrmSubmitHelper|submit.*field" --type php # Search for any form configurations that might use submit fields in payment settings echo "Searching for form configurations using submit fields in payment settings..." ast-grep --pattern 'post_content.*submit.*payment'Length of output: 1301
Script:
#!/bin/bash # Check how submit fields are used in Stripe controller echo "Checking submit field usage in Stripe controller..." rg "submit.*field|FrmSubmitHelper" -B 2 -A 2 stripe/controllers/FrmStrpLiteActionsController.php # Check for any direct dependencies on submit fields in payment processing echo "Checking payment processing logic..." rg "process.*payment.*submit|submit.*payment" -B 2 -A 2 stripe/Length of output: 21437
This was reported in https://github.com/Strategy11/formidable-acf/pull/80#pullrequestreview-2565740712