I want to get the selected tags using publish_post
hook, while publishing the post.
With below code, I can get only those tags which are already saved in the post. this will not work for new tags.
add_action( 'publish_post', 'post_published_notification', 10, 2 );
function post_published_notification( $ID, $post )
{
$post_tags = get_the_tags($ID);
if ( $post_tags )
{
print_r($post_tags);
}
}