woocommerce Rich snippet not working

#25474
Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Could you please share a link to one of the affected products on the sensitive data section so that we can investigate this issue further?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting us today.

    The errors are as a result of the is_related_to attribute on the product which is not getting all the related product data. You can opt to remove this attribute from the schema by adding the following code snippet to your theme’s functions.php file:

    /**
     * Filter to modify schema data.
     *
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        if(isset($entity['isRelatedTo'])){
           unset($entity['isRelatedTo']);
           return $entity;
        }
       
        return $entity;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Very nice,

    Now it is working. Thank you so much for the prompt support.

    Kind Regards.

    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/?rate=5#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.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

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

You must be logged in to reply to this ticket.