tweak to comment code

This commit is contained in:
Mike Jolley 2012-04-15 00:37:37 +01:00
parent 7aa97b0f38
commit f6ba5187fa
1 changed files with 4 additions and 1 deletions

View File

@ -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 );