Are you sure you want to delete price and stock information from Google search? You’re here. This guide shows how to hide woocommerce product price and stock information in Google. Google rich snipt e-commerce has had a great impact on our shopping habits. Now we actually go to the store for a few hours without browsing. Instead, you can search Google for the products you need and order them in many online stores. Through platforms such as woocomerce, everyone can create online stores and sell products to customers around the world. With the growth of online stores, search engines such as Google have also decided to strengthen games to provide the best matching results.
Considering the intention of users, Google introduced rich snipt. Rich snipt, also known as rich results, is a highlighted search result that contains important details, such as comments, prices, lists, tables, etc. This information will be displayed directly on the search page, and users can find the required content without clicking the website link. If you have an online store, you will find that SEO is the most important. Woocommerce recognizes this and pays special attention to SEO, so by default, it includes all rich snipts displayed in Google search results. Items such as product evaluation, rating, comments, price and stock information are displayed in product search results as follows:
Male Ritchie pets may be picky about store owners. These snipets are useful for end users, but as a store owner, you may particularly want to hide some information, such as price and inventory availability. Therefore, if there is an option to hide these details, it will help to maximize the use of the store. Let’s take a look at why Google wants to cancel the price and inventory of products, and how woocommerce does it. Why did Google cancel the price of woocommerce products? Although allowing fujini pets is good for SEO, there are several good conditions, such as excluding some details such as price and inventory status. Let’s discuss several reasons why woocommerce product prices and stock information are hidden in Google.
First, if users view all the information directly in the search results, they can decide not to visit your site. Therefore, if you want them to visit your store, you’d better delete some of this information. For example, suppose one of your products is currently out of stock. You can allow shoppers to purchase products or generate notifications when inventory of goods re exists, but users may not know or may not go to the store at all. In order to avoid this situation and allow customers to visit the store to see the options required to buy the product or other alternatives, the price and inventory information of woocomerce products must be hidden in Google search.
In addition, I don’t want customers to make decisions only based on price. Your product may not belong to the price of customers, and they make a decision on it. In this case, please consider all the functions of the product before the customer makes a final decision. You can also offer a special discount for the first buyer, but the buyer won’t know until the visitor visits the website. In addition, there may be special commodities for members, or you may not want to disclose price and inventory information to non members. Therefore, you must hide these details in the product page and Google search.
Finally, if someone visits your website and your website is satisfactory, or you propose transactions or interesting content, you are more likely to join your email list. In addition, if someone visits your store, it will be repositioned with relevant advertisements
visit. Now that we have a better understanding of why deleting product prices and stock information from Google search may be a good idea, let’s see how to do it. How to hide woocommerce product price and stock information in Google search it’s very easy to hide product price and inventory in Google search. Although some coding is required, the script is very short and no coding technology is required. Just follow the steps in sequence.
Before you start, you will edit some core fields, so it is recommended to create a sub topic before you start. You can change the core file of the parent theme, but the changes are ignored every time the theme is updated, so it is not recommended. This means that all customizations are lost for every update that may have a major problem. In addition, because an incorrect comma or semicolon may damage the entire site, you should pay special attention when dealing with parent topics. Therefore, it is recommended that you use subtopics to add customizations to your site. When a sub theme is implemented, all changes are separated from the parent theme and retained after the update. If you don’t know how to create a subtopic, check the guide or use one of the following plug-ins:
In other words, we will enter the process of deleting product price and inventory information from Google. Step 1: from the WordPress administration dashboard, go to shapes > Theme Editor. The second stage: then select the function of the current active theme and sub theme. Open the PHP file. Paste the following code snippet to the end of the file and click file update to save your changes. The function wc_remove_some_structured_data ($markup) {unset ($markup [\
That’s all! You hide price and stock information in Google search. But how do I remove more information from search results? Let’s see how to do it. If only the method of deleting all information from Google search is not enough, price and stock information can be further improved. To delete all the information displayed in rich snipt, copy the following code and use functions in the subtopic. Paste it to the end of the PHP file. Male function delete output structured data () {remove _action (\
This will remove product information from the search results, but not from the store. Now let’s look at how to hide products in the store. To hide specific products from Google search and remove specific products from Google search, use wc_get_product() – & gt; get_id(); Function that gets the ID of the item to hide. For example, you can delete a product with ID 123 using the following code: Function wc_remove_some_structured_data ($markup) {if (wc_get_product() – & gt; get_id() = = 123) {\/ \/ product ID unset ($markup [‘
offers’] ); $ Returns the label.} Returns another {$annotation.} add_filter( ‘woocommerce_structured_data_product’, ‘wc_remove_some_structured_data’ ); To hide multiple products at the same time, you must create an array containing the item ID and the loop.
Bonus: ways to hide woocommerce products woocommerce is a powerful plug-in that can manage online stores in a variety of ways. Easily create, edit, manage, and update products. In addition, the store also provides the option to temporarily hide products. There are several reasons for this. If the product is out of stock, if you want to temporarily stop selling the product and want to hide it before the launch date because you want to launch a new product, woocommerce provides an easy way to hide the product in the store in both cases. Let’s see how. Before we start, let’s take a look at the appearance of the woocommerce shopping page before deleting one of the products. Now let’s learn how to hide the knitted hat with logo in our store. Step 1: first, navigate to the WordPress administration dashboard, and then navigate to the product page. Move the mouse over the product you want to hide (in our example, benie with logo) and click Edit. Step 2: on the \