Created
June 26, 2018 14:16
-
-
Save mattwatsoncodes/1e1da50011532ec18687a82aba74f50a to your computer and use it in GitHub Desktop.
Prevent Gravity Forms Storing Data
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 | |
/** | |
* Prevent gravity forms storing data | |
**/ | |
function mkdo_remove_form_entry( $entry ) { | |
if ( class_exists( 'GFAPI' ) ) { | |
GFAPI::delete_entry( $entry['id'] ); | |
} | |
} | |
add_action( 'gform_after_submission', 'mkdo_remove_form_entry' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment