Skip to content

Add Tag API functions #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 14, 2023
Merged

Add Tag API functions #44

merged 10 commits into from
Mar 14, 2023

Conversation

n7studios
Copy link
Contributor

Summary

Adds the following API functions to provide API coverage for Tags

  • get_tags()
  • create_tag()
  • tag_subscriber()
  • remove_tag_from_subscriber()
  • remove_tag_from_subscriber_by_email()

Outputs a PHP deprecated notice if using add_tag(), because:

  • The function name is misleading; it actually tags a subscriber, rather than creates a tag - using tag_subscriber() is therefore preferred to tag a subscriber,
  • The second argument supports an array of options; tag_subscriber() provides the specific supported arguments (tag ID, email address, first name, custom fields)

add_tag() is not removed at this time, to ensure we don't introduce breaking changes to the SDK. The deprecation notice serves as an early warning to developers to migrate to tag_subscriber() as we will remove add_tag() at a later date.

Testing

  • Tests for above functions included.

Checklist

@n7studios n7studios added this to the 1.0.0 milestone Mar 13, 2023
@n7studios n7studios self-assigned this Mar 13, 2023
@n7studios n7studios requested review from a team, noelherrick and jenessawhite and removed request for a team March 13, 2023 14:22
@n7studios n7studios marked this pull request as ready for review March 13, 2023 14:22
@n7studios n7studios merged commit 774d670 into 1.0-beta Mar 14, 2023
@n7studios n7studios deleted the tag-functions branch March 23, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants