I have a client that would like to remove entries automatically from the database after the email notification is sent. I've found some support entries here that indicate the gform_after_submission() hook is what I want to hook into in order to remove those entries.
However, the one wrinkle in this is that we are using the form to connect to PayPal, and the form is set up not to send admin notifications until after payment is sent.
My question, then, is: Does the gform_after_submission() hook fire when the user hits the Submit button on the form, or does it fire after PayPal returns the user back to the client's website? I'm guessing that I shouldn't remove the entry until after PayPal returns the user back to the client's website, so I want to make sure I'm using the right hook.
Thanks for any advice you can offer