spinelle Posted April 22 Share Posted April 22 Hi, I have some issue with adapting a module for Prestashop 9. I am trying to do an upgrade file that will register a new hook: function upgrade_module_8_0_0($module) { if (version_compare(_PS_VERSION_, '9.0.0', '>=') === true) { if (!$module->registerHook('actionCategoryFormBuilderModifier')) { return false; } } return $module; } But it always return false. After looking into the registerHook function I found that Hook::registerHook is returning false on this test: if ( !($module_instance instanceof Module) || !isset($module_instance->id) || !is_numeric($module_instance->id) ) { return false; } And more exactly on this part "!isset($module_instance->id)" Does anyone has an idea why? I never had this issue before and I don't know what is wrong here. Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now