How to Hide WooCommerce Product price From Google Snippet

What is Structured Data?

Structured data ensures search engines like Google and Bing are able to show additional data in their Search Engine Results Page (SERP) such as the product price, stock and product review information.

Having this additional data available in your SERP listing can do wonders for your Click Through Rate (CTR) and conversions. Especially if you’re offering competitive pricing and/or exceptionally good reviewed products. 

See also  Adding Custom Currency to WooCommerce

This means by default your products are going to show on Google together with other data such as review stars, stock status, number of reviews and – you saw that coming – the product price.

Structured Data in WooCommerce

WooCommerce offers all of the shown strucutured data above and more by default. Here’s a full list of all the structured data;

  1. Product (includes pricing, stock, and aggregated ratings)
  2. Review (individual review markup)
  3. Breadcrumbs
  4. Website
See also  List WooCommerce product Categories

PHP Snippet:

/**
 * @snippet       Hide WooCommerce Product price
 * @how-to        Get eymockup.com FREE
 * @author        Arun Kumar, eymockup.com
 * @testing       WooCommerce 4.6
 */
 
add_filter( 'woocommerce_structured_data_product_offer', '__return_empty_array' );

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php

Leave a Reply

Your email address will not be published. Required fields are marked *