Plugin install (3 posts)

  1. night2008
    Posted 8 years ago #

    Hi Guys,

    Im currently working on my first WP plugin and had a question about the register_activation_hook() function.

    My plugin should create 2 DB tables upon activation, so I created my installfunction and hooked it in with the register_activation_hook() function:


    I've also tried using:


    My plugin is class based, so I run this function in the php5 constructor. The problem is, it doesn't get called, or the install function has no effect on my Database.

    Now I was wondering if I was doing something wrong? I've already looked for tutorials how to create plugins, looked @ forums, and more.

    I hope you guys can help me :)

  2. night2008
    Posted 8 years ago #

    OK peeps, my bad.

    I forgot to pass the reference to my object to my install function.


    This topic can be closed!

  3. whooami
    Posted 8 years ago #

    so close it -- only you have access to the resolved option at the top of thread :)

Topic Closed

This topic has been closed to new replies.

About this Topic