SyncGenerator::associateToBuddypress( $bpGroupId = null )
Associate current ld group to bp group
Description
Source
File: bp-integrations/learndash/library/SyncGenerator.php
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
| 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.