Jump to content

Error with The hook "updateproduct" is deprecated


Recommended Posts

Hi,
I got problem when update product and upload images to prestashop site 
{"errors":[
{"code":15,"message":"[PHP Unknown error #16384] The hook \"updateproduct\" is deprecated, please use \"actionProductUpdate\" instead in module \"cp_featuredproducts\". (\/var\/www\/vhosts\/decalkoo.com\/httpdocs\/classes\/Hook.php, line 914)"},
{"code":15,"message":"[PHP Unknown error #16384] The hook \"updateproduct\" is deprecated, please use \"actionProductUpdate\" instead in module \"cp_sidebarfeaturedproducts\". (\/var\/www\/vhosts\/decalkoo.com\/httpdocs\/classes\/Hook.php, line 914)"}]}
Any can help, please? 

Link to comment
Share on other sites

Hello, you need to edit file of module "modules/cp_featuredproducts/cp_featuredproducts.php"

In the module files, search for the lines where the "updateproduct" hook is used. It will look something like this:

//public function hookUpdateProduct($params) {

Replace hookUpdateProduct with the new hook actionProductUpdate.

public function hookActionProductUpdate($params) {

Now register hook in module:

$this->registerHook('actionProductUpdate');

unregister old hook, Clear the Cache and test.

Thanks

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...