Jump to content

$this->active


kanasaikuat

Recommended Posts

Hi guys, sorry if this is a common question but i can't found any answer via google search. May i know what is the purpose of "$this->active" in most of the module? I saw alot of this lines of code, but i have no idea what is the purpose.

 

if (!$this->active){

     ....code here....

}

Link to comment
Share on other sites

I think this is left from older version. I would need to double check, but it was used earlier in hooks to execute module hook only if module is active. I think that now PrestaShop checks on their side if module is active and only then executes the hook.

 

$this->active mainly checks if module is enabled in store.

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...