Merge pull request #25667 from jacoswan/fix-25666
Fix 25666 - Schema rating markup is missing required bestRating and worstRating
This commit is contained in:
commit
bfac625cdc
|
@ -305,7 +305,9 @@ class WC_Structured_Data {
|
|||
'@type' => 'Review',
|
||||
'reviewRating' => array(
|
||||
'@type' => 'Rating',
|
||||
'bestRating' => '5',
|
||||
'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
|
||||
'worstRating' => '1',
|
||||
),
|
||||
'author' => array(
|
||||
'@type' => 'Person',
|
||||
|
@ -350,7 +352,9 @@ class WC_Structured_Data {
|
|||
if ( $rating ) {
|
||||
$markup['reviewRating'] = array(
|
||||
'@type' => 'Rating',
|
||||
'bestRating' => '5',
|
||||
'ratingValue' => $rating,
|
||||
'worstRating' => '1',
|
||||
);
|
||||
} elseif ( $comment->comment_parent ) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue