Thanks for your quick response.
This is part of the code that’s throwing an error (line 7, in this case).
if ( !isset($markup['aggregateRating'])) {
$checked = !$product->get_review_count() && wc_review_ratings_enabled();
if ($checked) {
$markup['aggregateRating'] = array(
'@type' => 'AggregateRating',
'ratingValue' => 4.7,
'reviewCount' => 1,
);
}
}
Thanks again.