Is there a way to programmatically move an entry to the trash via the GFAPI.
Something like this:
$result = GFAPI::update_entry( $testentry,‘status’,‘trash’ );
I understand there is a delete_entry, in my case I need to keep a copy of the existing entry.
Jake_Jackson
(Jake Jackson (Gravity PDF))
2
Sure. Use the following:
$entry_id = $entry['id'];
$results = GFAPI::update_entry_property( $entry_id, 'status', 'trash' );
Good luck with your project!
2 Likes
Reading is fundamental! Many thanks for your quick and accurate response.
-Ben
1 Like