Product schema ratingCount problem

#19551
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Rank Math will take the rating data from WooCommerce and turn it into schema ready content. You can however override this on your theme by making use of the following code in your theme’s functions.php file:

    /**
     * Filter to add Brand Name for Products.
     *
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        $entity['aggregateRating']['ratingCount'] = '5';
        return $entity;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Product schema ratingCount problem’ is closed to new replies.