• Resolved pixieblitz

    (@pixieblitz)


    Hi! Thanks for this plugin, it looks great! I just have two questions:
    1) Will this also act on the existing members already in our BP groups, or does it only affect membership changes after the plugin is installed? (I’d like to have the existing BP group members put into CiviCRM contact groups.)
    2) Is there a way to filter which BP groups it syncs? I only need a few of the BP groups synced to Civi, and it seems like it will eventually get messy if every new BP member created group ends up in Civi’s groups list.

    Cheers!
    Luca

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Christian Wach

    (@needle)

    1) Will this also act on the existing members already in our BP groups, or does it only affect membership changes after the plugin is installed?

    The settings page for the plugin has a second tab where you can sync existing groups in either direction.

    2) Is there a way to filter which BP groups it syncs?

    Hmm, no there isn’t. I will add a filter. Thanks for pointing this out.

    Cheers, Christian

    Plugin Author Christian Wach

    (@needle)

    @pixieblitz I’ve added a filter to the development code on GitHub:

    https://github.com/christianwach/bp-groups-civicrm-sync

    You can filter the groups like so:

    add_filter( 'bp_groups_civicrm_sync_group_should_be_synced', 'my_exclude_filter', 10, 2 );
    function my_exclude_filter( $should_be_synced, $group_id ) {
    	$groups_to_sync = [1, 3]; // The BuddyPress group IDs which *do* sync.
    	if ( ! in_array( $group_id, $groups_to_sync ) ) $should_be_synced = false;
    	return $should_be_synced;
    }
    

    Hope that helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter to only sync selected BP groups?’ is closed to new replies.