Created
September 27, 2018 23:48
-
-
Save Idealien/469e636d540820855bd4ac325131f3a6 to your computer and use it in GitHub Desktop.
Remove a Gravity Form entry immediately after submission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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