Added "reviewBody" to review schema
Update get_comment_* functions args
This commit is contained in:
parent
237a047e26
commit
dd97b00815
|
@ -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 ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue