• Hello,

    I’m relatively new to WP and Woocommerce. I built a site using Woocommerce with a number of products. Now when I search for my products on Google, the search results show the product price right above the snippet.
    I understand Woocommerce is compatible with Google structured data search; therefore, the price is shown automatically. Unfortunately my products are mostly informational and I would prefer to remove the price in the search results. Is there any way to configure WooCommerce to hide the price in search results, but still have it shown on the product page?

    Any suggestions will be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m looking for a way to hide prices in Google search results too, ESPECIALLY since a requirement to have variable products to work in WooCommerce we have to add a price. So I’ve add $0.01 to everything, have it hidden in CSS, and now it is appearing in Google search results. *headdesk*

    Thread Starter Shannon Z.

    (@shannon-z)

    I finally figured out how to do this. Go to plugins>woocommerce>templates>single-product folder, locate price.php. Change the following codes from:

    “<div itemprop=”offers” itemscope itemtype=”http://schema.org/Offer”&gt;
    <p class=”price”><?php echo $product->get_price_html(); ?></p>
    <meta itemprop=”price” content=”<?php echo $product->get_price(); ?>” />
    <meta itemprop=”priceCurrency” content=”<?php echo get_woocommerce_currency(); ?>” />
    <link itemprop=”availability” href=”http://schema.org/&lt;?php echo $product->is_in_stock() ? ‘InStock’ : ‘OutOfStock’; ?>” />
    </div>”

    TO:
    “<div>
    <p class=”price”><?php echo $product->get_price_html(); ?></p>
    </div>”

    This worked on single products. I haven’t tried it on variable products. Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not let woocommerce product's price shown in Google search resutls’ is closed to new replies.