get_post_meta – return values
What returns get_post_meta and what to check.
If you don’t look at the documentation, sometimes you think that it can return falseif there is no such field in the record. But no, it returns an empty string:
Because of this, it should only be checked for emptyotherwise the checks will fail.
So it will be correct: