Can`t call plugin class methods outside the plugin file. (1 post)

  1. ihjalmar
    Posted 1 year ago #


    I have a quite simple class loaded from the plugin directory, its basically a wrapper to remove som unwanted actions. The problem is when I try to call this class outside the plugin file - then its not working. If I move the new class stuff and accessing the methods in, let`s say a theme file, it looks like everything run smoothly, no errors, the remove_action returns 1(for success), but the action is actually not removed.

    remove_action('wp_head', 'rsd_link'); for example.

    If I instantiate the class in the same file where the class itself is - in the a file in the plugin directory - everything goes as planned - but not when called outside that file. Why?

Topic Closed

This topic has been closed to new replies.

About this Topic