• Resolved maxe___

    (@maxe_)


    Hey,
    i am developing a WordPress Plugin, but I am failing in creating the databse table with register_activaton_hook.

    If I use the register_activation_hook function in a class nothing happens and the table is not created.

    The Code is here:
    https://github.com/devMX/TeamSpeak3-Webviewer-for-Wordpress

    Can anyone explain me why?
    If I am declaring the installDatabase function as static and using
    register_activation_hook(__FILE__, array('devmx\Wordpress\TSViewer\TSViewer', 'installDatabse'));

    it is working.

    Regards,
    Max

The topic ‘register_activation_hook in class’ is closed to new replies.