From f6ba5187fa5182da7d79c7b655c0877c2728ce92 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Sun, 15 Apr 2012 00:37:37 +0100 Subject: [PATCH] tweak to comment code --- classes/class-wc-order.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/class-wc-order.php b/classes/class-wc-order.php index a22dba7f841..fa3e4015104 100644 --- a/classes/class-wc-order.php +++ b/classes/class-wc-order.php @@ -612,7 +612,10 @@ class WC_Order { $comment_author_url = ''; $comment_content = esc_attr( $note ); $comment_agent = 'WooCommerce'; - $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_agent'); + $comment_type = ''; + $comment_parent = 0; + $comment_approved = 1; + $commentdata = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_agent', 'comment_type', 'comment_parent', 'comment_approved' ); $comment_id = wp_insert_comment( $commentdata );