diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f8d87b5dd5b..c89851fe1b7 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2607,6 +2607,10 @@ class Form } elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only $sql .= " AND p.fk_product_type = 0"; } + // Add where from hooks + $parameters = array(); + $reshook = $hookmanager->executeHooks('selectProductsListWhere', $parameters); // Note that $action and $object may have been modified by hook + $sql .= $hookmanager->resPrint; // Add criteria on ref/label if ($filterkey != '') { $sql .= ' AND (';