On which hook of WP init this code part?
$user_id
– why and from how is this var value?
update_post_meta()
will use the post ID, see Codex.
On which hook of WP init this code part?
$user_id
– why and from how is this var value?
update_post_meta()
will use the post ID, see Codex.