Note: This is a Developer level doc provided as guidance. We are unable to dispense advice or review code under our Support Policy.
Like most WordPress plugins, AutomateWoo can be extended by other developers to add functionality. AutomateWoo triggers are complex by nature and creating custom triggers is considerably more difficult than creating a custom function which can be easily tied to an action.
Using AutomateWoo async events
In version 4.8, AutomateWoo optimized it’s async events system which has implications for how async triggers function. If you’re developing custom triggers we recommend having a look at the asynchronous events documentation. This is especially important if you are hooking your custom trigger to any of AutomateWoo’s async actions.
Custom trigger example
This is an example of a custom trigger than is triggered by a WordPress action hook. This could be initiated anywhere in your code by using WordPress’s
do_action() function. The action needs a single User ID which is then caught by the custom trigger, which in turn passes the user along to any workflows which are set up to use the custom trigger.