Among other things, the WooCommerce plugin for creating online stores with WordPress is fully optimized for SEO, offering structured Schema markup data for products, as well as other micro-data used by search engines.
Thanks to this, by default, your products will be displayed in Google search results with more information than just the product title and description.
The structured Schema data that WooCommerce generates and Google can display in its results are as follows:
- Breadcrumbs
- Price
- Inventory
- Star Rating

This is all thanks to the woocommerce_structured_data_product_offer
filter, and like everything in WordPress, also in WooCommerce, you can manipulate it according to your needs.
Today we’re going to see the situation where you prefer not to have the price appear in Google results, either because your competition offers lower prices, or simply because you don’t want that to be the differential value when choosing to buy in your Ecommerce, since you offer much more than what is simply seen in the search engine, whatever.
Whatever the reason, getting the price of your WooCommerce products out of Google search results is very easy, it’s just a matter of one line of code, this one:
add_filter( 'woocommerce_structured_data_product_offer', '__return_empty_array' );
Code language: JavaScript (javascript)
You must add this line of code at the end of the functions.php
file of the active theme or, if you prefer, in your customizations plugin.
Save the changes and soon the structured price data of your products will disappear from the Google search results, as it is not immediate
Read this post in Spanish: Cómo quitar el precio de los productos de WooCommerce en los resultados de Google #SemanaWooCommerce