Skip to content

Instantly share code, notes, and snippets.

@bezierer
Last active July 25, 2019 18:34
Show Gist options
  • Save bezierer/bab771746f9233c48aee67f609e0c91c to your computer and use it in GitHub Desktop.
Save bezierer/bab771746f9233c48aee67f609e0c91c to your computer and use it in GitHub Desktop.
Stop Gravity Forms from storing entries in the database.
/*
  Stop Gravity Forms from storing entries in the database.
  Replace '2' with your form ID.
*/
add_action( 'gform_after_submission_2', 'site_name_remove_form_entry' );
function site_name_remove_form_entry( $entry ) {
    GFAPI::delete_entry( $entry['id'] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment