Disable Limit Feeds when Editing via Gravity View

Code

Filename: gpls-disable-for-gravity-view.php

<?php
/**
 * Gravity Perks // GP Limit Submissions // Disable Limit Feeds when Editing via Gravity View
 * https://gravitywiz.com/documentation/gravity-forms-limit-submissions/
 */
add_filter( 'gpls_rule_groups', function( $rule_groups, $form_id ) {

	if ( is_callable( 'gravityview_get_context' ) && gravityview_get_context() == 'edit' ) {
		$rule_groups = array();
	}

	return $rule_groups;
}, 10, 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.