Skip to content

Commit 999404a

Browse files
authored
gcgs-disable-async.php: Added new snippet to disable async.
1 parent ba32383 commit 999404a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* Gravity Connect // Google Sheets // Disable Async on Google Sheets Feeds
4+
*
5+
* By default, GC Google Sheets feeds run asynchronously. This snippet will disable that, so they run in the same request as the form submission.
6+
*
7+
* This is useful for debugging whether there is a wider issue with asynchronous feeds on a site.
8+
*
9+
* Installation:
10+
* 1. Install per https://gravitywiz.com/documentation/how-do-i-install-a-snippet/
11+
*/
12+
add_filter( 'gform_is_feed_asynchronous', function( $is_async, $feed, $entry, $form ) {
13+
if ( $feed['addon_slug'] === 'gp-google-sheets' ) {
14+
return false;
15+
}
16+
17+
return $is_async;
18+
}, 50, 4 );

0 commit comments

Comments
 (0)