Merge pull request #27887 from ATM-Consulting/FIX_Ajout_hooks

FIX : Adding hooks init
This commit is contained in:
Laurent Destailleur
2024-01-31 20:51:25 +01:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ $action = GETPOST('action', 'aZ09');
if ($user->socid) {
$socid = $user->socid;
}
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('ordercontact', 'globalcard'));
$result = restrictedArea($user, 'commande', $id, '');
$usercancreate = $user->hasRight("commande", "creer");

View File

@@ -80,6 +80,10 @@ $permissiontoadd = $usercancreate;
if ($user->socid) {
$socid = $user->socid;
}
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('orderdocument', 'globalcard'));
$result = restrictedArea($user, 'commande', $id, '');