Disable Passing Through Entries Without a Token

Code

Filename: gpep-disable-passing-through-entries-without-a-token.php

<?php
/**
 * Gravity Perks // Easy Passthrough // Disable Passing Through Entries Without a Token
 * https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/
 */
add_filter( 'gpep_bypass_session_init', function() {
	if ( ! rgget( 'ep_token' ) || ! gp_easy_passthrough()->get_entry_for_token( rgget( 'ep_token' ) ) ) {
		$session = gp_easy_passthrough()->session_manager();
		$session->reset();
	}
} );

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.