SyncGenerator::associateToLearndash( $ldGroupId = null )
Associate current bp group to a ld group
Description
Source
File: bp-integrations/learndash/library/SyncGenerator.php
public function associateToLearndash($ldGroupId = null)
{
if ($this->ldGroupId && ! $ldGroupId) {
return $this;
}
$this->syncingToLearndash(function() use ($ldGroupId) {
$ldGroup = get_post($ldGroupId);
if (! $ldGroupId || ! $ldGroup) {
$this->createLearndashGroup();
} else {
$this->unsetBpGroupMeta(false)->unsetLdGroupMeta(false);
$this->ldGroupId = $ldGroupId;
}
$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.