Add the function to /override/classes/Link.php
If that file doesn't exist yet, just create it exactly as follows:
<?php class Link extends LinkCore { public function getCategoryName( $id_category ){ $idLang = Context::getContext()->language->id; $categoryObject = $this->getCategoryObject($id_category, $idLang); return $categoryObject->name; } }
Also, if you need to create the override file, you'll need to regenerate the class index.
To do that, just delete /var/cache/prod/class_index.php and /var/cache/dev/class_index.php