Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook allows you to do something after an entry is deleted.
Usage
add_action('frm_after_destroy_entry', 'my_custom_function'); function my_custom_function($entry_id)
Parameters
- $entry_id (integer)
- $entry (object) The data of the entry to be deleted
Examples
Basic example
add_action('frm_after_destroy_entry', 'my_custom_function', 10, 2);
function my_custom_function( $entry_id, $entry ) {
$target_form_id = 29; // change 29 to your form ID.
if ( $target_form_id !== (int) $entry->form_id ) {
return;
}
// Handle deleted entry for target form.
}