WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Its been 3 days now I am fighting to resolve the issue here:

An action hook where a comment meta is updated

I am pretty sure, even if I am a beginner, that the hook update_comment_meta doesnt exist, and that it is not possible to use something like:

add_action( 'update_comment_meta', 'do_soemthing', 10, 4);

Any confirmations, or objections are highly welcomed.

share|improve this question
How is this question different from the one you asked earlier and linking to? – Rarst Jul 4 '13 at 14:22
Thank you Rarst for your time. In fact, after too much time looking for the solution to my linked question, I start even believing that there is no hook with the name update_comment_meta. I came back here to get confirmation that there is a hook with such name, because really no ressources on internet about this (also I am newbie). – whiteletters in blankpapers Jul 4 '13 at 14:26
@Rarst, I use update_post_meta with no problems, and when I use the same way update_comment_meta, it doesnt work, all code in my callback is executing outside, but never inside callback. I come here for expert ideas, really no discussion about this hook on internet . – whiteletters in blankpapers Jul 4 '13 at 14:30
Please elaborate on how you are using the hook in core. From the answer you got it does exist and should work. – Rarst Jul 4 '13 at 14:31
I think the linked topic explains how I am using the hook. I will give more explanations as an edit. Also I will accept the answer above since you also confirm it. – whiteletters in blankpapers Jul 4 '13 at 14:33
up vote 3 down vote accepted

Well, it's a little bit complicated ;)

If you will search update_comment_meta hook, you won't find it.

But it exists :)

There is update_comment_meta function and it calls update_metadata function with first param set to comment.

This update_metadata function does something like this (meta.php line 149):

do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $_meta_value );

where $meta_type is the first param of this function.

So it will be update_comment_meta when this function is called by update_comment_meta function (because $meta_type is then equal to 'comment').

share|improve this answer
thank you for your answer, I am totally agreeing with the logic behind your answer, and this is the logic I followed, but unfortunately the calleback function never executes. Did you checked my linked post? Thanks – whiteletters in blankpapers Jul 4 '13 at 13:35
Well, I did not. I'll check it later today. – Krzysiek Dróżdż Jul 4 '13 at 13:56
Thank you very much. – whiteletters in blankpapers Jul 4 '13 at 14:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.