Hello,
We appreciate you reaching out to us with your question about the WooCommerce Schema and the Rank Math Schema.
You are correct that you can remove the price property in the schema and open graph tags via a Filter. However, as the price is a required field in the Product Schema, removing it might have negative consequences on your SERP listings.
To ensure that your product pages are optimized for search engines while still maintaining your B2B store’s requirements, we recommend using the Rank Math Schema and then consulting with a developer or an SEO expert to find the best solution for your specific case.
If you have any further questions or need additional assistance, please feel free to reply to this ticket, and we will be happy to help.
Best regards
Sources:
Content Analysis Tests for Product Pages » Rank Math
How to Customize Schema Markup for WooCommerce Products » Rank Math
Resolving Rank Math Schema Markup Related Issues
Remove All Schema from Product Category Pages » Rank Math
Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
Yes, it is possible to remove certain properties from the product schema. You can add the following code to your theme’s functions.php file to remove the price:
/**
* Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
* Replace $schmea_type with schema name like article, review, etc.
* @param array $entity Snippet Data
* @return array
*/
add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
unset($entity['offers']['price']);
return $entity;
});
Here’s a guide to adding the code to the website:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
However, please note that Price is a required field in the Product schema as our bot suggested above.
If you’re doing it, you might get an error in the Schema for the missing price.
Hope that helps.
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.