Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal error: Class 'BP_Component' not found despite hooked into 'bp_include'


  • kuching
    Participant

    @substrato

    I’m trying to make a BuddyPress plugin using these guidelines

    http://codex.buddypress.org/theme-compatibility/how-to-enjoy-bp-theme-compat-in-plugins/

    however, if I try to add a class that extends BP_Component WordPress will crash and return the error.

    I tried to load my plugin after BuddyPress using the following code:

    function bp_pop_load() {
    
        require_once( dirname( __FILE__ ) . '/bp_pop.php' );
    }
    add_action( 'bp_include', 'bp_pop_load' );

    but it doesn’t work

    if I wrap my whole plugin with a class_exists( ‘BP_Component’ ) conditional, nothing will happen (condition is false)

    How can I fix this?

    fiy, I’m just calling BP_Component like this:

    class BP_PostsOnProfile extends BP_Component {
      // my stuff... but error is thrown at the line above
    }
  • The topic ‘Fatal error: Class 'BP_Component' not found despite hooked into 'bp_include'’ is closed to new replies.
Skip to toolbar