• I am creating an admin panel plugin that requires wpml to be loaded at first, so that I would use the $sitepress object (specifically, the active languages list, and the retrieval of the translated items).

    The problem I have is that I can’t find a proper documentation on how to do it. I’ve seen the method with the option active_plugins but when I use that to bring my plugin as the last of the array, it says it “cannot re-instantiate” (true, it must have been loaded before).

    So what is the catch? How can this be achieved?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve had success with similar issue by naming my plugin with later letter in the alphabet (they seem to be loading alphabetically). This is however not documented and I have no idea how reliable it is – most probably it’s not reliable at all.

    Moderator bcworkz

    (@bcworkz)

    Try placing your dependent functions inside an action callback for ‘plugins loaded’?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Loading a plugin after WPML (or any plugin)’ is closed to new replies.