Added "reviewBody" to review schema

Update get_comment_* functions args
This commit is contained in:
Claudio Sanches 2019-11-18 11:47:56 -03:00
parent 237a047e26
commit dd97b00815
1 changed files with 6 additions and 5 deletions

View File

@ -299,15 +299,16 @@ class WC_Structured_Data {
foreach ( $comments as $comment ) {
$markup['review'][] = array(
'@type' => 'Review',
'author' => array(
'@type' => 'Person',
'name' => get_comment_author( $comment->comment_ID ),
),
'reviewRating' => array(
'@type' => 'Rating',
'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
),
'datePublished' => get_comment_date( 'c', $comment->comment_ID ),
'author' => array(
'@type' => 'Person',
'name' => get_comment_author( $comment ),
),
'reviewBody' => get_comment_text( $comment ),
'datePublished' => get_comment_date( 'c', $comment ),
);
}
}