✨️ Do not sync Twingle projects to CiviCRM which are marked as such
There is a checkbox in TwingleMANAGER that allows you to enable and disable API calls to the Twingl API (de.systopia.twingle). This commit makes the TwingleCampaign extension pay attention to this checkbox, so if it is unchecked, no campaign will be created in CiviCRM for this Twingle project.
This commit is contained in:
parent
066a0096df
commit
bbbf6e1cc6
2 changed files with 13 additions and 3 deletions
|
@ -165,6 +165,11 @@ class CRM_TwingleCampaign_BAO_TwingleProject extends Campaign {
|
|||
*/
|
||||
public function create(bool $no_hook = FALSE): bool {
|
||||
|
||||
# If this project is not meant to be synced, do not create a campaign
|
||||
if (!$this->values['project_options']['has_civi_crm_activated']) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$result = parent::create($no_hook);
|
||||
|
||||
// Check if campaign was created successfully
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue