Disable merchant listing schema and set no pricing in product schema

[ad_1]

We have a B2B wholesale store that offers different product pricing and price currency to customers depending on their assigned user role. All products have a base price but I don’t want it to show in the structured data as some customers may have higher or lower price.

Structured Data is showing critical issues as I’ve excluded the pricing in structured data.

add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
unset($entity['offers']['price']);
unset($entity['offers']['priceSpecification']);
unset($entity['offers']['priceValidUntil']);
unset($entity['offers']['priceCurrency']);
unset($entity['mainEntityOfPage']['author']);

return $entity;
});

Is there any way to disable the merchant listing schema as there is no pricing but for the product schema can I get it to work with no pricing?

Can I set null or 0 for all? Can I keep it removed but do another workaround to get valid structured data?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer