Google Console Errors

#841069
  • Resolved Emma
    Rank Math free

    Hi,

    I know you have touched on this before but it seems Google has ramped this up. Is there any easy solution to sorting out these errors from Google via Raank Math:

    Missing field “shippingDetails” (in “offers”)
    Missing field “hasMerchantReturnPolicy” (in “offers”)
    Missing field “aggregateRating”
    Missing field “review”

    Many thanks
    Emma

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    The warnings you have shared are for your product schema for the reviews/ratings:
    https://rankmath.com/kb/aggregate-rating-error/

    Regarding the shipping details, you can edit the following filter with the appropriate data for these properties so it gets included in the Product Schema as well: https://rankmath.com/kb/filters-hooks-api-developer/#change-post-schema-data

    We have created an example filter that would help add this data and it assumes that the refund policy is only applicable to the USA and that it has a 30-day refund period.

    The shipping rate section also assumes a flat fee of 5$ to ship within the United States.

    This would need to be changed according to the website specifications but it should be a good starting point:

    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
        // Return policy
        $entity['offers']['hasMerchantReturnPolicy']['@type'] = 'MerchantReturnPolicy';
        $entity['offers']['hasMerchantReturnPolicy']['applicableCountry'] = 'US';
        $entity['offers']['hasMerchantReturnPolicy']['returnPolicyCategory'] = 'https://schema.org/MerchantReturnFiniteReturnWindow';
        $entity['offers']['hasMerchantReturnPolicy']['merchantReturnDays'] = 30;
        $entity['offers']['hasMerchantReturnPolicy']['returnMethod'] = 'https://schema.org/ReturnByMail';
        $entity['offers']['hasMerchantReturnPolicy']['returnFees'] = 'https://schema.org/FreeReturn';
    
        // Shipping details
        $entity['offers']['shippingDetails']['@type'] = 'OfferShippingDetails';
        $entity['offers']['shippingDetails']['shippingRate']['@type'] = 'MonetaryAmount';
        $entity['offers']['shippingDetails']['shippingRate']['value'] = 5;
        $entity['offers']['shippingDetails']['shippingRate']['currency'] = 'USD';
        $entity['offers']['shippingDetails']['shippingDestination']['@type'] = 'DefinedRegion';
        $entity['offers']['shippingDetails']['shippingDestination']['addressCountry'] = 'US';
    
        return $entity;
    });

    Here is a guide you can follow to add the filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

    Emma
    Rank Math free

    Thank you for your assistance and for your prompt response. Really appreciate it.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Google Console Errors’ is closed to new replies.