Woo Product Schema without showing Price

#670269
  • Resolved Anonymous
    Rank Math free

    Hi team,

    hope this message finds you well!

    Quick question regarding the WooCommerce Schema.

    We run a WooCommerce B2B store with hidden prices and would like to use the Rankmath Schema (without showing the price).

    I know you can remove the price property in the schema and open graph tags via a Filter.

    But as Price is a required field in the Product Schema I wonder if there are any negative SERP consequences to be expected.

    Best regards
    Julian

    The following support ticket might be connected – but is not publicly available: https://support.rankmath.com/ticket/product-schema-without-price

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

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

The ticket ‘Woo Product Schema without showing Price’ is closed to new replies.