WordPress.org

Support

Support » Plugins and Hacks » Missing argument/parameter in hook

Missing argument/parameter in hook

  • Hello

    I’m developing an easy plugin and I need to run my task when a comment is approved.

    I’ve added my action to the hook wp_set_comment_status like this :

    add_action('wp_set_comment_status', 'myfoo' );

    My function looks like :

    function myfoo($comment_id, $comment_action)

    the point is that I always get this message

    Warning: Missing argument 2 for myfoo

    when the action is called.

    How is it ? Shouldn’t wp_set_comment_status be called with 2 params ?

    Let me know.


    Simone

  • The topic ‘Missing argument/parameter in hook’ is closed to new replies.