• Since a recent update, WooDiscuz keeps changing all comments posted in the discussion to a “review” type, which on my site is triggering extra validation on whether the user has purchased the product. Is there a way to disable this from happening? I need the comment type to remain as “woodiscuz”.

Viewing 1 replies (of 1 total)
  • Thread Starter Moorst

    (@moorst)

    public function wpc_new_comment($commentdata) {
            $commentdata['comment_type'] = isset($commentdata['comment_type']) ? $commentdata['comment_type'] : '';
            $comment_post = get_post($commentdata['comment_post_ID']);
            if ($comment_post->post_type === 'product' && $commentdata['comment_type'] != 'woodiscuz') {
                $com_parent = $commentdata['comment_parent'];
                if ($com_parent != 0) {
                    $parent_comment = get_comment($com_parent);
                    if ($parent_comment->comment_type == 'woodiscuz') {
                        $commentdata['comment_type'] = 'woodiscuz';
                    } else {
                        $commentdata['comment_type'] = 'review';
                    }
                } else {
                    $commentdata['comment_type'] = 'review';
                }
            }
            return $commentdata;
        }

    This is the function responsible. Is there an filter to remove this?

Viewing 1 replies (of 1 total)
  • The topic ‘Stop changing comment_type to review’ is closed to new replies.