Programmatically add custom meta description via metatag module
Instead of directly altering the metatag, you might want to look into creating a custom token: As described in this article

This will give you more freedom and flexibility. Then you can just use that custom token in the backend of metatags and configure it for content types that you like.

/admin/config/search/metatags


If you however, still prefer to use the hook in the op, don't forget that those are cached, you will need to clear all caches before it might appear.