Hide product price from Google
-
Hi,
For our wholesale business prices are only visible after logging in, but I noticed that prices were also visible in Google Search results (coming from Rankmath).
After some research I have taken the following steps to stop this:
- Changed schema type for products to none instead of Woocommerce
- Change Products Robots Meta to index and no snippet
- Added the following snippet to stop Rankmath passing on the price:
- add_filter( “rank_math/snippet/rich_snippet_product_entity”, function( $entity ) {
- unset($entity[‘offers’][‘price’]);
- return $entity;
- });
- As well as this snippet:
- function wc_remove_some_structured_data( $markup ) {
- unset( $markup[‘offers’] );
- return $markup;
- }
- add_filter( ‘woocommerce_structured_data_product’, ‘wc_remove_some_structured_data’ );
Went into Google Search Console and selected 1 product page to reindex, checked results after reindex, but price is still passed on through Rankmath?
!– Search Engine Optimisation by Rank Math – https://rankmath.com/ —
meta property=”product:price:amount” content=”33.13″
meta property=”product:price:currency” content=”AUD”
How do I configure Rankmath to stop passing on the product price to Google Search. I don’t want any product meta data to be displayed by Google, only the product title, so I don’t want the availability be visible either.
Thank you very much for your assistance,
Hans
- You must be logged in to reply to this topic.