Hook Life Cycle

1. Task is Triggered in Zenbership By A User

This can be almost any core functionality of the program, such as a member being created, an event registration being processed, etc.. You can see a full list of possible actions when creating a hook from within the Zenbership adminstrative dashboard at Integration > Hooks | Create Hook | What task should trigger this hook?

2. Zenbership Launches "Before Task" Hooks

This takes place within the core code and is executed at within the db::start_task() method.

3. Zenbership Runs All "Before Task" Hooks

At this point all of your hooks which are set to run BEFORE a task is completed are executed.

4. Zenbership Runs The Core Task

This is the core code within Zenbership designed to actually execute what the program is trying to do. This code should never be altered!

5. Zenbership Runs All "After Task" Hooks

With the core functionality completed, the program now runs the db::end_task() method, which now includes any output from the core functionality within the $data array (learn more). For example, if the hook is concerned with a member registration, you will receive information about the member who registered in the $data array.

Last modified 3 weeks ago.