We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gpep-delete-token-after-use.php
1 parent f75cc8e commit 3ce9a1dCopy full SHA for 3ce9a1d
gp-easy-passthrough/gpep-delete-token-after-use.php
@@ -0,0 +1,14 @@
1
+/**
2
+ * Gravity Perks // Easy Passthrough // Delete Token After Use
3
+ * https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/
4
+ *
5
+ * Delete the EP token that was used to populate a given form after that form is submitted.
6
+ */
7
+add_filter( 'gform_after_submission', function() {
8
+ if ( rgget( 'ep_token' ) && is_callable( 'gp_easy_passthrough' ) ) {
9
+ $entry = gp_easy_passthrough()->get_entry_for_token( rgget( 'ep_token' ) );
10
+ if ( $entry ) {
11
+ gform_delete_meta( $entry['id'], 'fg_easypassthrough_token' );
12
+ }
13
14
+} );
0 commit comments