Skip to content

Instantly share code, notes, and snippets.

@alex-authlab
Last active August 29, 2023 18:03
Show Gist options
  • Save alex-authlab/caaac513e9da214c08e7112e2d82de91 to your computer and use it in GitHub Desktop.
Save alex-authlab/caaac513e9da214c08e7112e2d82de91 to your computer and use it in GitHub Desktop.
Fluent Form Entry Delete Bulk
/*
* insert in function.php & remove the code after deleting entries
*/
add_action( 'plugins_loaded', function(){
$formId= 8; // add your form ID
$startId = 20; // Entry Delete start from this ID
$endId = 21; // Entry Delete end with this ID
delete_entry($formId,$startId,$endId);
} );
function delete_entry($formId,$start,$end) {
$delete = wpFluent()->table('fluentform_submissions')
->where('form_id', $formId)
->where('serial_number', '>=', $start)
->where('serial_number', '<=', $end)
->delete();
if($delete){
$message ='<div class="notice notice-success ">
<p>Fluent Form Entry Deleted.</p>
</div>';
}else{
$message ='<div class="notice notice-error "><p> Fluent Form Entries Deletion Error! </b></p></div>';
}
add_action( 'admin_notices', function($message){
echo $message;
} );
}
@daanii1
Copy link

daanii1 commented Aug 29, 2023

Not Working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment