I am starting to experiment with civirules, and it looks like it's going to help a lot for automated workflows. There are some actions that are missing and am interested in playing to add more.
Using Wordpress 4.92, Civicrm 4.7.27, CiviRules 1.17
Am looking here: https://docs.civicrm.org/civirules/en/latest/create-your-own-action/ but am having a hard time understanding exactly what I need to do to add an additional action.
"It is pretty simple (at least that is what we think) to add your own actions to the CiviRules Engine. You can either do that by adding it to the CiviRules extension or by creating your own extension and including your own action." Well it doesn't seem simple because I can't find a simple way of doing this.
There's some existing action items that would easily serve as templates for what I want to do, so I'd like to add an additional action to the existing CiviRules extension.
I've attempted to code additional mgd.php and .php files in the appropriate folder structure. But when I do this, the class isn't registered in the database - obviously.
"If you didn't create your extension with civix you should add the hook_civicrm_managed_entities to your extension and return the array below." How do I do this exactly if I'm adding to the existing extension and not creating a new one? Where do I put the hook? What's the syntax? I've never worked with hooks before. I've Google searched for hook_civicrm_managed_entities but I'm not sure what this is as it doesn't return anything. Is this the hook_civicrm_managed(&$entities) hook that is in https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed/?
I attempted to use create a hook directory as per https://docs.civicrm.org/dev/en/latest/hooks/setup/wordpress/ and use the code that is recommended and that broke my site. The info in this doc seems to imply that it relates to WordPress 4.6, and the link https://civicrm.org/blog/haystack/working-with-civicrm-46-in-wordpress has a comment that says the civicrm_managed_entities hook won't work properly with WordPress? "Tim Otten reminded me (thanks Tim) that there's another hook which won't behave as expected in WordPress, which is 'hook_civicrm_managed'. Callbacks work fine but, at present, there's no logic for managing the entities in WordPress. Another one for the roadmap, logged here for reference."
Help please!! Step 2 and 3 I can easily do, but Step 1, not so much.