Jump to content

Plugin Position in specific hook during install

LIJE Creative

Recommended Posts



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?



Share this post

Link to post
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.

Share this post

Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More