Add hooks in package xml instead of php code

Signed-off-by: enyst <engel.nyst@gmail.com>