Jump to content

Plugin Position in specific hook during install


LIJE Creative

Recommended Posts

Hi,

 

I'm looking for a way to set a plugin position to 1 (first on the list) in PHP.

In the module, I have the install() function in which I use registerHook('displayPayment') to put the plugin in here but it's the last on the list.

 

Any idea?

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I had a quick look at the code and it seems adding the following to the end of your module's install function might work:

$this->updatePosition(Hook::getIdByName('displayPayment'), false, 1);

I haven't tested the code, so you'll have to do that yourself.

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