Created
February 16, 2021 03:51
-
-
Save techjewel/9a51240852253339ab94df32c0556158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add a tag to a current logged in or cookie based contact | |
// getCurrentContact() method will find the contact from logged in info or from the cookie from email link click | |
// For more api doc: https://github.com/FluentCRM/fluent-crm/wiki/PHP-API | |
$contact = FluentCrmApi('contacts')->getCurrentContact(); | |
$tagsToAdd = [1,2]; | |
if($contact) { | |
$contact->attachTags($tagsToAdd); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment