Skip to content

Conversation

@matty0501
Copy link
Contributor

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.

@coderabbitai
Copy link

coderabbitai bot commented Nov 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new PHP snippet that filters Gravity Forms feed asynchronicity; for feeds where addon_slug === 'gp-google-sheets' it forces synchronous processing by returning false from the gform_is_feed_asynchronous hook, otherwise it preserves the original value.

Changes

Cohort / File(s) Change Summary
Asynchronous Execution Override
gc-google-sheets/gcgs-disable-async.php
New filter callback for gform_is_feed_asynchronous registered at priority 50. Returns false to disable async execution when $feed['addon_slug'] === 'gp-google-sheets', otherwise returns the incoming $is_async. Callback accepts $is_async, $feed, $entry, $form.

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify callback signature and priority align with Gravity Forms hook expectations
  • Confirm string comparison for addon_slug matches feed structure and casing
  • Ensure no unintended side effects for non-Google Sheets feeds (fallback preserves $is_async)

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adding a new snippet file to disable async functionality for GCGS feeds, which matches the file addition and primary purpose.
Description check ✅ Passed The description includes both required template sections (Context with ticket/Notion links, and Summary) and provides clear explanation of the snippet's purpose and value.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 08c3aec and 7566070.

📒 Files selected for processing (1)
  • gc-google-sheets/gcgs-disable-async.php (1 hunks)

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.

Copy link

@coderabbitai coderabbitai bot left a 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_slug key, 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

📥 Commits

Reviewing files that changed from the base of the PR and between b1e723e and 08c3aec.

📒 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.

Copy link
Contributor

@saifsultanc saifsultanc left a 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.

@saifsultanc saifsultanc merged commit 999404a into master Dec 9, 2025
0 of 3 checks passed
@saifsultanc saifsultanc deleted the matty0501-patch-1 branch December 9, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants