function custom_woocommerce_structured_data_product ($data) {
  global $product;
  
  $data['brand'] = 'Optimise Wellbeing Ltd';
  $data['mpn'] = 'test';
  $data['aggregateRating'] = array(
    'ratingValue' => '4.5',
    'reviewCount' => '84'
  );
  $data['review'] = array(
      '@type' => 'Review',
      'author' => 'Optimise Wellbeing Ltd',
      'datePublished' => '2020-10-04',
      'name' => 'Admin',
      'description' => 'Best company Optimise Wellbeing Ltd',
      'reviewRating' => array(
        '@type' => 'Rating',
        'bestRating' => 5,
        'worstRating' => 1,
        'ratingValue' => 5
      ),
    );
  return $data;
}
add_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product', 10  );


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *