3

I am working on an extension that takes some entry data (from the control panel) and performs some tasks with it, just prior to insert/update. I am currently using the "entry_submission_end" hook to accomplish this. However, I would like to abort the entry submission/update process if my extension tasks are not completed successfully. It doesn't look like the "entry_submission_end" hook provides the

if (ee()->extensions->end_script === TRUE) return;

code to do this. What hook can I use to accomplish this? Thanks.

--Garrett

1 Answer 1

1

Actually, that hook does check for end_script - it just happens inside the trigger_hook() method.

However, if you want to bail out of an insert/update when your custom tasks are not completed, then you need to use something earlier than entry_submission_end (it's too late at that point, the entry has already been submitted).

I'd suggest either entry_submission_start or entry_submission_ready.

And be sure to redirect the user after you set ee()->extensions->end_script to TRUE, lest they end up at the WSOD!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.