From b0fe8994e4bfc4cc63da61d9c7c09200771e5044 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 17 Mar 2022 09:32:45 +0100 Subject: [PATCH] NEW add hook selectProductsListWhere in select_produits_list function --- htdocs/core/class/html.form.class.php | 4 ++++ 1 file changed, 4 insertions(+) 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 (';