diff --git a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php index 6604764e1c4..304efb85770 100644 --- a/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php +++ b/htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php @@ -78,7 +78,7 @@ class InterfaceWebhookTriggers extends DolibarrTriggers $target_url = $static_object->fetchAll(); foreach ($target_url as $key => $tmpobject) { $actionarray = explode(",", $tmpobject->trigger_codes); - if (is_array($actionarray) && in_array($action, $actionarray)) { + if ($tmpobject->status == Target::STATUS_VALIDATED && is_array($actionarray) && in_array($action, $actionarray)) { // Build the answer object $resobject = new stdClass(); $resobject->triggercode = $action;