Title: Delete function not working
Last modified: September 1, 2016

---

# Delete function not working

 *  Resolved [vinhtvu2](https://wordpress.org/support/users/vinhtvu2/)
 * (@vinhtvu2)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/)
 * Delete function fail on no-zip option.
 * I have no-zip and delete check. It’s attaching the files correctly now, but it’s
   not deleting.
 * [https://wordpress.org/plugins/gf-upload-to-email-attachment/](https://wordpress.org/plugins/gf-upload-to-email-attachment/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * (@billiardgreg)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703017)
 * Please confirm you are working with version 2.1.1. The first function in the 
   php, the last lines should look like:
 *     ```
       add_filter( 'gform_confirmation', 'gfuea_clean_zips', 10, 4 );
               $notification['attachments'] = $attachments;
           }
           GFCommon::log_debug( $log . 'stopping.' );
           return $notification;
       }
       ```
   
 *  Plugin Author [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * (@billiardgreg)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703019)
 * I meant version 2.1.2. I am not sure but I think the WP Plugin system has issues
   with sub versions. If I need to push a 2.2 I will to have updated be better pushed
   out. But from my testing with the moving of that filter towards the bottom of
   that function allowed for deletion even without zip.
 *  Thread Starter [vinhtvu2](https://wordpress.org/support/users/vinhtvu2/)
 * (@vinhtvu2)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703066)
 * I am on version 2.1.2.
 * Adding a log_debug for the $gf_delete_files variable in the gfuea_clean_zips 
   show that it’s always “no”.
 *  Plugin Author [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * (@billiardgreg)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703078)
 * I just did a test with writing to the error log and confirmed things are working
   how they should.
    I put the following code in: ‘ error_log(“Delete Files: ” .
   $gf_delete_files . ” ” . date(“Y-m-d H:i:s”)); ‘ and got the following response
   after checking and unchecking the box.
 * [25-Aug-2016 20:57:29 UTC] Delete Files: yes 2016-08-25 20:57:29
    [25-Aug-2016
   20:58:42 UTC] Delete Files: no 2016-08-25 20:58:42
 * I am going to make a slight modification to something and then give it a version
   2.2 to try to force an update for you but I am seeing the delete functionality
   working for no zip.
 *  Plugin Author [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * (@billiardgreg)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703083)
 * I am going to start limiting version numbers to just one decimal place as I think
   that is how the system fully updates everything. But please give version 2.2 
   a try and let me know if it starts working for you for some reason. I only changed
   some wording and also the
    ‘if ($last7 == “GFUEANZ” || $zip_attachment != ‘yes’){‘
   so that it would register the code changing.
 * I wonder if the globals use is not working. If that is the case then I will have
   to look into another way of accomplishing the delete after confirmation kind 
   of thing.
 *  Thread Starter [vinhtvu2](https://wordpress.org/support/users/vinhtvu2/)
 * (@vinhtvu2)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703096)
 * I am on version 5.3.3 of PHP, not sure if that makes a difference.
 * I uninstalled and force reinstall of version 2.1.2, and verified in the readme
   and code that it was 2.1.2.
 * I’ll try version 2.2 and see.
 * I also have multiple notifications, the one that I want to delete the files on,
   is not the last notification. The last notification does not have file attachments
   or anything on it. Does that matter?
 *  Thread Starter [vinhtvu2](https://wordpress.org/support/users/vinhtvu2/)
 * (@vinhtvu2)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703099)
 * Bingo, that was it. I didn’t know the notification with the delete has to be 
   the last notification. I mean, it only make sense.
 * Doh: User Error.
 * Thanks for the great plugin and helping me with the trouble shoot.
 *  Thread Starter [vinhtvu2](https://wordpress.org/support/users/vinhtvu2/)
 * (@vinhtvu2)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703100)
 * Resolved. Thanks!
 *  Plugin Author [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * (@billiardgreg)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703106)
 * I will look into how to make it work no matter where it gets checked of. Thanks
   for bringing it to my attention.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Delete function not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gf-upload-to-email-attachment.svg)
 * [GF Upload to Email Attachment](https://wordpress.org/plugins/gf-upload-to-email-attachment/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gf-upload-to-email-attachment/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gf-upload-to-email-attachment/)
 * [Active Topics](https://wordpress.org/support/plugin/gf-upload-to-email-attachment/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gf-upload-to-email-attachment/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gf-upload-to-email-attachment/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/delete-function-not-working-2/#post-7703106)
 * Status: resolved