CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • contact_id not available for hook_civicrm_post when creating contributions
Pages: [1]

Author Topic: contact_id not available for hook_civicrm_post when creating contributions  (Read 708 times)

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
contact_id not available for hook_civicrm_post when creating contributions
November 04, 2010, 07:42:38 am
Hey there,

I have a question on using hook_civicrm_post.

I want to update some custom data for membership fee contributions each time membership fee contributions are edited or created.  I need to do the contact id of the person making the contribution for the logic in the custom data.

But the contact_id in $objectRef is blank during the create operation, so I can't find the contact_id look up membership information.

Any ideas on how I can solve this problem?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: contact_id not available for hook_civicrm_post when creating contributions
November 04, 2010, 07:55:08 am
Hmm, I think I take this back - looks like it is available.  Oh well, at least this ups by forum post count by 2 today :)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • contact_id not available for hook_civicrm_post when creating contributions

This forum was archived on 2017-11-26.