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)


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: