Run a workflow with custom PHP code. This is useful if you like to extend your custom applications with action.
Choose “Custom Hook” as your trigger to define the name of the hook, which you can use to start this workflow.
Using custom hooks requires writing some PHP which can be placed in a dedicated plugin or your themes function.php.
Read more on how to add custom code to your website.
Trigger for a single subscriber
To trigger a workflow for a specific subscriber, you have to define the $subscriber_id
as second argument.
mailster_trigger( 'my_custom_hook_c47264', $subscriber_id );
Trigger for multiple subscribers
You can also pass multiple subscriber ids as an array.
mailster_trigger( 'my_custom_hook_c47264', array( $subscriber_id1, $subscriber_id2 ) );
Trigger for all subscribers
If the second argument is missing, Mailster will run the workflow for all your subscribers.
mailster_trigger( 'my_custom_hook_c47264' );
Learn more about Triggers here.