Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.0, 4.5
-
Fix Version/s: 4.6
-
Component/s: WordPress Integration
-
Documentation Required?:Developer Doc
Description
At present, only one WordPress callback can exist per CiviCRM hook. For example, `hook_civicrm_pre` can only be received by `wordpress_civicrm_pre()`. This prevents multiple WordPress plugins from receiving callbacks from the same CiviCRM hook.
I have rewritten `CRM/Utils/Hook/WordPress.php` to enable this behaviour, whilst retaining compatibility with current implementations and Civi extensions.
There are three current CiviCRM hooks which do not conform to the standard CiviCRM hook signature, which will need deprecating in favour of new hooks that do not require return values.
Full documentation in the README here:
https://github.com/christianwach/civicrm-wp-hook-tester
Edit: affects all versions of CiviCRM - not sure how to flag that, so added latest as well