Documentation > Developers > Action Hooks

Action Hooks

The following hooks are triggered at various picu events.

Learn about Action Hooks.


After Saving Selection

picu_after_saving_selection

This one is pretty powerful. It gets triggered each time the selection is saved, which in turn happens every time an image is selected or when a comment is created for an individual image.

We have created an example snippet on how to implement a new comment notification.


After Approval

picu_after_approval

This hook is fired each time a recipient approves the collection.

You can use it like this:

function my_picu_after_approval( $collection_id, $ident ) {
    // Do something
}

add_action( 'picu_after_approval', 'my_picu_after_approval', 10, 2 );Code language: PHP (php)

The following example shows how to automatically send a thank you email to your client.


After Email Sent

picu_after_email_sent

This gets triggered every time picu sends an email.

You can use it like this:

function my_picu_after_email_sent( $mail_context, $collection_id ) {
    // Do something
}

add_action( 'picu_after_email_sent', 'my_picu_after_email_sent', 10, 2 );Code language: PHP (php)

Need help?

If you couldn’t find what you were looking for and need more assistance, please get in touch with us directly and we’re happy to help.