Please note that Developer Mode must be enabled in Ninja Forms for this action to be visible.
WP Hook is a custom form action that acts as a callback to an action hook of your choice. You can use the WP Hook action instead of writing a full custom function of your own.
Using the WP Hook action
The action is found on the Emails and Action tab of the form builder. Developer Mode must be enabled. To add the action to any form, click Add New Action and then the WP Hook action from inside the Actions Window that opens.
The WP Hook action will now appear in your list of actions. Click on it to open its settings window.
The Hook Tag setting is where you can specify what WordPress action hook (stock or custom) to call.
The callback will trigger on form submission only. Note that the callback cannot update the submitted form data as this is a WordPress action and not a filter.
During submission the specified “Hook Tag” is passed a $form_data array variable. This array contains the form id, form fields, and form settings data as top level keys in the array.
If this all sounds like a foreign language to you and you’d like to learn more about hooks in WordPress, check out this page in WordPress’ Developer Resources.