WordPress.org

Ready to get started?Download WordPress

Forums

Plugin not initializing (1 post)

  1. rhj4
    Member
    Posted 2 months ago #

    Code in plugin A calls a method in plugin B.

    B is implemented as a class with a few wrapper functions. The method called by A does a new [class name]() and then invokes a method within the class.

    The new [class name] code fires the constructor which contains:

    add_action('init', array($this, 'init_my_code'), but 'init_my_code' never gets called. The init code loads JavaScript code, but that code is not getting loaded... hence a problem.

    Is the problem related to hooking to 'init' or am I missing something fundamental? Where should I be hooking to?

Reply

You must log in to post.

About this Topic