Skip to content

Instantly share code, notes, and snippets.

@Idealien
Created September 27, 2018 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Idealien/469e636d540820855bd4ac325131f3a6 to your computer and use it in GitHub Desktop.
Save Idealien/469e636d540820855bd4ac325131f3a6 to your computer and use it in GitHub Desktop.
Remove a Gravity Form entry immediately after submission
<?php
add_action( 'gform_after_submission_3', 'remove_entry_magic', 10, 2);
function remove_entry_magic( $entry ) {
GFAPI::delete_entry( $entry['id'] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment