From 8a9be6705d4c674013dfa2ab74184b2370d73df4 Mon Sep 17 00:00:00 2001 From: kamel Date: Thu, 14 Apr 2022 14:14:07 +0200 Subject: [PATCH] FIX: Call of printOriginObjectLine hook --- htdocs/core/class/commonobject.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 02421ea9157..7828e61b166 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4824,11 +4824,9 @@ abstract class CommonObject if (!empty($this->lines)) { foreach ($this->lines as $line) { if (is_object($hookmanager) && (($line->product_type == 9 && !empty($line->special_code)) || !empty($line->fk_parent_line))) { - if (empty($line->fk_parent_line)) { - $parameters = array('line'=>$line, 'i'=>$i); - $action = ''; - $hookmanager->executeHooks('printOriginObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - } + $parameters = array('line' => $line, 'i' => $i); + $action = ''; + $hookmanager->executeHooks('printOriginObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } else { $this->printOriginLine($line, '', $restrictlist, '/core/tpl', $selectedLines); }