1

In Drupal, I'm using hook_civicrm_postSave_table_name to listen for CiviEvent registrations. I've implemented hook_civicrm_postSave_civicrm_participant($dao) where I test for certain status_id values and do something with a custom Drupal module. Although this works for non-paid events, I noticed that it's not working for paid events.

The reason is because during the payment process the status_id is '6', but when the payment is processed and the status_id changes to '1', the hook isn't called (The hook does get called when the database row is written with status_id 6).

The documentation says "This hook will get called again with every update", but this doesn't seem to be the case.

Is this a bug, or should I be getting the participant status update in a different way?

1

You can use hook_civicrm_post hook which gets called every time a core object is written to db. Detailed description can be found here: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_post/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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