what tables uses wp_get_post_terms

I have a (uncommented) legacy code that is using wp_get_post_terms function, and always returns WP_Error (Invalid Taxonomy).
The calling of the function is:

$location = wp_get_post_terms($post_id, "location");

I had been inspecting the database, and the first conclusion is that in the table wp_term_taxonomy there are many entries with “location” into taxonomy field.
So I have trhee questions: Why this? How this function relates the post_id with the taxonomy? and the last one… what tables uses wp_get_post_terms?

Thank you very much.

0

Leave a Comment