Merge pull request #24266 from bloxera/fix_for_hook_parseexpression

Fix #24260: Fix of hook in parseExpression for dynamic prices
This commit is contained in:
Laurent Destailleur 2023-03-19 14:16:36 +01:00 committed by GitHub
commit 4cd5acdec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,12 +127,12 @@ class PriceParser
global $user;
global $hookmanager;
$action = 'PARSEEXPRESSION';
if ($result = $hookmanager->executeHooks('doDynamiPrice', array(
'expression' =>$expression,
'product' => $product,
'values' => $values
if ($reshook = $hookmanager->executeHooks('doDynamiPrice', array(
'expression' => &$expression,
'product' => &$product,
'values' => &$values
), $this, $action)) {
return $result;
return $hookmanager->resArray['return'];
}
//Check if empty
$expression = trim($expression);