Default Trigger Settings

wpwhpro/settings/default_trigger_settings

Description:
This filter enables you to add your own custom default settings to the webhook triggers. Plase note, that the webhook trigger needs to support the webhooks in the first place.

Parameter Type Description
$return array

All available webhooks (triggers & actions)

$fields array

An array of the settings data. Down below you will find an example.

 

This is how the webhook trigger setting may look like:

'wpwhpro_trigger_frontend_only' => array(
	'id'          => 'wpwhpro_trigger_frontend_only',
	'type'        => 'checkbox',
	'label'       => WPWHPRO()->helpers->translate('Trigger from frontend only', 'wpwhpro-fields-trigger-settings'),
	'placeholder' => '',
	'default_value' => '',
	'description' => WPWHPRO()->helpers->translate('Check this button if you want to fire this trigger only from the frontent. Every post submitted through the frontend is ignored ( ! is_admin() function is used ).', 'wpwhpro-fields-trigger-settings')
)

return apply_filters('wpwhpro/settings/default_trigger_settings', $fields);

Updated on August 10, 2019

Was this article helpful?

Related Articles