Delay entry creation

Ben Calhoun
Sat, 01 Apr 2023 16:25:11 +0000
Get Help

So, the flow I’m trying to accomplish is:

User updates form (this is done via Gravity View)
The entry is processed with all the normal validations
The entry is NOT updated yet
User is redirected to checkout with adjusted price
User pays
Upon payment completion, the entry is now saved and updated

So far, I can accomplish everything except what is in bold. Right, now, I’m able to hook in and redirect the user after they update their entry, pass the price difference to WooCommerce, and then trigger an action on payment completion.

I’m having trouble telling gravity forms to NOT save the entry on submission and then figuring out a way to pass that updated entry object to the last step after payment has completed.

I thought about using the gform_form_tag filter to add a custom handler to the form… but I’m unsure how to handle that data, temporarily store it, and then pass it to the end function. That route seems a little too much for what I’m wanting, especially with the $entry object so nicely provided in so many hooks.

Any suggestions would be greatly appreciated.

4 posts - 3 participants