Fix pro issue 6081 (Square fatal error when refunding with payments s…#3041
Fix pro issue 6081 (Square fatal error when refunding with payments s…#3041Crabcyborg merged 4 commits intomasterfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new PHP helper class Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@square/helpers/FrmSquareLiteApiHelper.php`:
- Around line 12-22: The docblock for refund_payment incorrectly declares
"@return bool" while FrmSquareLiteConnectHelper::refund_payment() actually
returns false|object; update the refund_payment method's docblock in
FrmSquareLiteApiHelper::refund_payment to reflect the correct return type
(false|object) so static analysis and callers see the accurate signature; keep
the rest of the docblock intact and ensure the returned value documentation
matches the behavior of FrmSquareLiteConnectHelper::refund_payment.
- Around line 6-10: Update the file-level doc comment above class
FrmSquareLiteApiHelper to correctly reference the Square payments context
instead of "Authorize.Net": change the sentence that currently reads "the
Authorize.Net add on will trigger fatal errors" to mention the Square payments
add-on (or generically "payments add-on/submodule") so the comment accurately
reflects that FrmSquareLiteApiHelper exists for backward compatibility with the
Payments Submodule and prevents Square-related fatal errors.
- Around line 24-34: The docblock on FrmSquareLiteApiHelper::cancel_subscription
incorrectly declares `@return` bool while the method forwards to
FrmSquareLiteConnectHelper::cancel_subscription which returns false|object;
update the docblock for cancel_subscription to declare the correct return type
(false|object) to match FrmSquareLiteConnectHelper::cancel_subscription and keep
any inline method behavior unchanged so callers see the accurate signature.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b0c4f98f-1ae5-4449-a16a-dfdfbba63bcd
📒 Files selected for processing (1)
square/helpers/FrmSquareLiteApiHelper.php
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Mar 24, 2026 12:53p.m. | Review ↗ | |
| JavaScript | Mar 24, 2026 12:53p.m. | Review ↗ |
…ubmodule active)
Fixes https://github.com/Strategy11/formidable-pro/issues/6081
Summary by CodeRabbit
Release Notes