SyncGenerator::associateToBuddypress( $bpGroupId = null )

Associate current ld group to bp group

Description

Source

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

152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
public function associateToBuddypress($bpGroupId = null)
{
    if ($this->bpGroupId && ! $bpGroupId) {
        return $this;
    }
 
    $this->syncingToBuddypress(function() use ($bpGroupId) {
        $bpGroup = groups_get_group($bpGroupId);
 
        if (! $bpGroupId || ! $bpGroup->id) {
            $this->createBuddypressGroup();
        } else {
            $this->unsetBpGroupMeta(false)->unsetLdGroupMeta(false);
            $this->bpGroupId = $bpGroupId;
        }
 
        $this->setSyncGropuIds();
    });
 
    return $this;
}

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.