-
Notifications
You must be signed in to change notification settings - Fork 92
gcgs-disable-async.php: Added new snippet to disable async.
#1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a new PHP snippet that filters Gravity Forms feed asynchronicity; for feeds where Changes
Sequence DiagramsequenceDiagram
participant GF as Gravity Forms
participant Filter as gform_is_feed_asynchronous
participant Callback as gcgs_disable_async (priority 50)
participant Decision as Async Decision
GF->>Filter: Invoke hook to determine async
Filter->>Callback: Call registered callback
Callback->>Callback: Inspect feed['addon_slug']
alt addon_slug == "gp-google-sheets"
Callback-->>Decision: return false (force sync)
else
Callback-->>Decision: return $is_async (preserve)
end
Decision-->>GF: Async behavior resolved
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
gc-google-sheets/gcgs-disable-async.php (1)
13-13: Consider adding defensive check for array key access.While Gravity Forms should always provide the
addon_slugkey, accessing it directly without validation could generate PHP notices if the feed array is malformed or missing this key.Apply this diff to add a defensive check:
- if ( $feed['addon_slug'] === 'gp-google-sheets' ) { + if ( ! empty( $feed['addon_slug'] ) && $feed['addon_slug'] === 'gp-google-sheets' ) { return false; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
gc-google-sheets/gcgs-disable-async.php(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: PHP Lint (PR)
gc-google-sheets/gcgs-disable-async.php
[warning] 13-13: PHPCS: Found precision alignment of 2 spaces.
[error] 13-13: PHPCS: Multi-line function call not indented correctly; expected 4 spaces but found 2.
🪛 GitHub Check: PHPCS (Files Changed)
gc-google-sheets/gcgs-disable-async.php
[failure] 17-17:
Line indented incorrectly; expected at least 1 tabs, found 2 spaces
[failure] 17-17:
Multi-line function call not indented correctly; expected 4 spaces but found 2
[warning] 17-17:
Found precision alignment of 2 spaces.
[failure] 15-15:
Line indented incorrectly; expected 1 tabs, found 2 spaces
[failure] 15-15:
Multi-line function call not indented correctly; expected 4 spaces but found 2
[warning] 15-15:
Found precision alignment of 2 spaces.
[failure] 14-14:
Line indented incorrectly; expected at least 2 tabs, found 1
[failure] 14-14:
Tabs must be used to indent lines; spaces are not allowed
[failure] 13-13:
Line indented incorrectly; expected 1 tabs, found 2 spaces
[failure] 13-13:
Multi-line function call not indented correctly; expected 4 spaces but found 2
[warning] 13-13:
Found precision alignment of 2 spaces.
🔇 Additional comments (1)
gc-google-sheets/gcgs-disable-async.php (1)
1-11: LGTM! Clear documentation and purpose.The header documentation clearly explains the snippet's purpose, use case, and installation instructions.
saifsultanc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good.
TODO @saifsultanc - fix the issues and merge.
Context
⛑️ Ticket(s): https://secure.helpscout.net/conversation/3095424739/90097
📓 Notion: https://www.notion.so/gravitywiz/Doc-Update-GCGS-Feeds-Not-Running-2b600ab68edf802f86bbfa228520f90e
Summary
This snippet disables async on GCGS feeds. This is one of the first troubleshooting steps we recommend when debugging GCGS feed issues. Adding the snippet to the SL will help reference this in the docs and also support tickets.