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) »
  • Hooks in Wordpress
Pages: [1]

Author Topic: Hooks in Wordpress  (Read 585 times)

bob

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Wordpress 3.4.2
  • MySQL version: ?
  • PHP version: 5
Hooks in Wordpress
December 17, 2012, 03:30:49 pm
Hello there,
I'm quite new to CiviCRM and I'm using it on wordpress. (Version 4.2.6 stable downloaded from sourceforge projects/civicrm/files/civicrm-stable/4.2.6/civicrm-4.2.6-wordpress.zip)

I'm trying to implement some hooks. I followed the instructions on the wiki (confluence/display/CRMDOC42/Hook+Reference?showChildren=false)
Which state that hooks on wordpress are created using a "php" file placed under the "Custom PHP Path Directory".

I set the directory and placed a file there. Nothing happens. (I checked the directory/php-file is accessible via browser; it is)
How should the file be named? I assumed any filename would work, but apparently that is not the case.
I even tried putting non-valid php code in the file and no errors are thrown, which seems to indicate that the file is not being read in the first place.

Can anyone please help me?

Thanks a lot in advance

bob

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Wordpress 3.4.2
  • MySQL version: ?
  • PHP version: 5
Re: Hooks in Wordpress
December 17, 2012, 05:17:41 pm
Got it, the filename must be

civicrmHooks.php


I added that information on the wiki (the link I posted before).

Cheers

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Hooks in Wordpress

This forum was archived on 2017-11-26.