SyncGenerator::createBuddypressGroup()

Create bp group based on current ld group

Description

Source

File: bp-integrations/learndash/library/SyncGenerator.php

607
608
609
610
611
612
613
614
615
616
617
618
619
620
protected function createBuddypressGroup()
{
    $ldGroup = get_post($this->ldGroupId);
    $settings = bp_ld_sync('settings');
 
    $this->bpGroupId = groups_create_group([
        'name'   => $ldGroup->post_title ?: "For Social Group: {$this->ldGroupId}",
        'status' => $settings->get('learndash.default_bp_privacy'),
    ]);
 
    groups_update_groupmeta($this->bpGroupId, 'invite_status', $settings->get('learndash.default_bp_invite_status'));
 
    $this->setSyncGropuIds();
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.