Programmatic Notification with manual Trigger
Send the notification from the code, nothing needs to be configured in the Dashboard.
To make it work you'll need:
Custom Manual Trigger
Notification definition
Action to trigger the Notification
Trigger
Let's define a simple Trigger without any Merge Tags.
Notification
The notification is just a function call with a configuration array. We'll register the Notification along with the Trigger.
In this example, we using a simple email Carrier, but you are free to use any other Carrier registered within the Notification plugin. The easiest way to get the Carrier configuration is to set it up in WordPress Dashboard and just export the Notification to JSON. The JSON file will have all the keys you need to configure here.
Action
Our Trigger uses notification_manual_trigger_348m7t5
action hook, so the only one thing left is to call it somewhere. The simplest would be:
It can be convenient to wrap this with a simple $_GET
param check.
And call it like this: example.com?i3m84ty
Last updated
Was this helpful?