woocommerce adds the schema.org informations not only to the product itself, but also on the related products. So you get some errors according to the google schema.org test tool. how can I remove this schema.org informations on related products?

this part of the price.php shouln’t load on related products:

    <meta itemprop="price" content="<?php echo esc_attr( $product->get_display_price() ); ?>" />
<meta itemprop="priceCurrency" content="<?php echo esc_attr( get_woocommerce_currency() ); ?>" />
<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />

Read more here: WooCommerce: Remove schema.org on related products


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: