WordPress Post tags (get_the_tags & has_tag)

I have a plugin with a publish_post action callback. In the callback I need to check for the presence of a tag. I have tried using has_tag and enumerating the post’s tags with get_the_tags. In all cases there are no tags, when in fact the post does have a tag. I can edit the post in the admin site and see the tag. Is there something else I need to do to get the post’s tags?

Read more here: WordPress Post tags (get_the_tags & has_tag)

Leave a Reply

Your email address will not be published. Required fields are marked *