File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Gravity Perks // Inventory // Disable Object Cache
4+ * https://gravitywiz.com/documentation/gravity-forms-inventory/
5+ *
6+ * GP Inventory caches objects to improve performance. This snippet disables object caching for a specific form.
7+ *
8+ * Instructions:
9+ *
10+ * 1. Install the snippet.
11+ * https://gravitywiz.com/documentation/managing-snippets/#where-do-i-put-snippets
12+ */
13+
14+
15+ // This snippet disables object caching for a specific form.
16+ add_filter ( 'gpi_should_cache_object ' , function ( $ cache , $ form_id ) {
17+ if ( $ form_id === 123 ) { // Update "123" to your form ID
18+ return false ;
19+ }
20+
21+ return $ cache ;
22+ }, 10 , 2 );
23+
24+ // This snippet disables object caching for all forms.
25+ add_filter ( 'gpi_should_cache_object ' , '__return_false ' );
You can’t perform that action at this time.
0 commit comments