Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Class 'BP_Group_Extension' not found Installing Plugin


Paul Gibbs
Keymaster

@djpaul

Probably your plugin is getting loaded before BuddyPress is.

I’m not even sure this code works as it should, but try adding this (renaming the function of course):

/* Check that BuddyPress is loaded before Achievements */
function dpa_load_buddypress() {
if ( function_exists( 'bp_core_setup_globals' ) )
return true;

/* Get the list of active sitewide plugins */
$active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );

if ( !isset( $active_sidewide_plugins['buddypress/bp-loader.php'] ) )
return false;

if ( isset( $active_sidewide_plugins['buddypress/bp-loader.php'] ) && !function_exists( 'bp_core_setup_globals' ) ) {
require_once( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
return true;
}

return false;
}
add_action( 'plugins_loaded', 'dpa_load_buddypress', 11 );

Skip to toolbar