How to Hide Products Without Price on WooCommerce
How to Hide Products Without Price on WooCommerce

How to Hide Products Without Price on WooCommerce

Introduction

However popular this platform, WooCommerce is, it isn’t surprising that there are still a lot of people in the e-commerce niche who aren’t familiar with it. If you doubt this fact then you need to read up the findings by Coding Like a Pro.

According to them, WooCommerce has become the most widely known web store on the internet.; However, it has not penetrated a lot of countries in the world. This says a lot…doesn’t it?

Anyways, let’s get into our aim in this lesson.

In case you are yet to fully understand what this platform is all about what you can do on it, let’s lock you in. It is a WordPress open-source online store plug-in. That means, that it’s only accessible to people who own websites on WordPress.

Global Trend on WooCommerce

How does this platform fare in the world of tech? You may want to ask. Well, the stats are well too marveling. Remember the App was just introduced on the 27th of September, 2011. Since, then, it has been greeted with so much rush and enthusiasm.

By September 2015, this plug-in rose to become the biggest in the web. It was installed on 30% of e-commerce websites which ran into millions. But that’s not all.

Today, it has recorded over 67 million downloads and supports 28% of internet business sites. How comes this boom!? Well, success, they say, attracts. Woocommerce recorded a huge success in offering practical solutions to business that are powered by WordPress. Its simple and easy-to-install framework is still much talked about.

What does it mean to “hide Product Price?”

This is another question newbie using WordPress for their e-commerce would be asking. Are you one of them? Don’t worry, we’ll go through it together.

Let’s assume you just built your store on Woocommerce. Of course, the next thing to follow is that you upload your products and start off. Now, if you want to register your commodities without their prices showing, you have just one way to go about it – hide the prices of the products.

Hmm…that sounds pretty easy in the mouth, right? Well, be rest assured it isn’t just as easy as it sounds. But don’t let your heart jump. You can get it done in about a few moments.

So, you know. People hide product prices for a lot of things. One, it could be that they want to pull traffic or customers to the actual product page in other to swell the rate click-through. Two, they need a site that’s catalog-built. Whichever one it is, we are required to do some modifications in other to enjoy achieve such an objective. And “hide the product price” is a major part of such modifications.

Other reasons you may need to conceal product prices

We have already stated this. But then, we can equally consider the following reasons:

  • For the aim of cataloging
  • Combine each product with each purchase. So, when you have a little more expensive good that you choose not to discourage your buyers, you may simply conceal the price.
  • When your product is exhausted and unavailable, you may need to take the price down.

How do we keep our product prices secret?

Now, we’ve have come to the practical aspect of the lesson. There are procedures we must review before we forge ahead to achieve this task. Obviously, we will have the simplest come first. And it’s the Woocommerce default procedure for concealing product prices.

WooCommerce->Settings->Products->Inventory.

WooCommerce Products Inventory
Out of stock Woocommerce

That’s it. Very simple, right? Well, however simple it may seem, it is not entirely reliable. Though it’s better you try it out first, there may be times it disappoints.

That’s the major reason you will need to learn the second part. This isn’t as simple as the first. In fact, you will need to write some code to get it done – plug-in.

Using plug-in

This solution is more like a backup to the first above. Just while it may appear you are already sweating trying to conceal your product price using the first method, you may just drop it and move on to this second method.

Yes, a lot of people get discouraged for the rigorous process involved in this method. But, it’s worthwhile. But, if you are not patient enough or unable to code, you can easily get any of the plug-ins on the WordPress platform. You just search for them.

Using code

But, if you are patient enough to code, that’s fantastic. You are good to go. Here is the :

add_action( 'woocommerce_product_query', 'codinglikepro_hide_products_without_price' );
function codinglikepro_hide_products_without_price( $q ){
   $meta_query = $q->get( 'meta_query' );
   $meta_query[] = array(
      'key'       => '_price',
      'value'     => '',
      'compare'   => '!='
   );
   $q->set( 'meta_query', $meta_query );
}

All you have to do is take this code, go straight to your functions.php file and paste it there. It’s a guarantee; your problems will be over. 

Wrap Up

Good, you followed through to this point. This tutorial must certainly have helped you learn a lot of things concerning this concept and its application process.

You can as well see that you don’t need to stress yourself that much. You just have to follow simple instructions or procedures and in just about seconds, your problems are over.

Though everyone takes the simplest method, it entirely depends on your choice. If you use the first method and you don’t see the result, you can proceed to the second or the last. Just copy and paste, that’s all you have to do.

Spread the love
1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5)
You need to be a registered member to rate this.
Loading...

Leave a Reply