WooCommerce: Hide Prices on the Shop & Category Pages

Interesting WooCommerce customization here. A client of mine asked me to hide/remove prices from the shop page and category pages as she wanted to drive more customers to the single product pages (i.e. increasing the click-through rate).

As usual, a simple PHP snippet does the trick. I never recommend to use CSS to “hide” prices, as they would still be visible in the code – PHP stops the prices from loading, so they’re invisible to the user.

WooCommerce: Hide Prices from Shop & Category Pages
WooCommerce: Hide Prices from Shop & Category Pages

PHP Snippet 1: Remove Prices from the Shop Page Only

/**
 * @snippet       WooCommerce Hide Prices on the Shop Page
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 5.1
 * @community     https://businessbloomer.com/club/
 */
 
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

PHP Snippet 2: Remove Prices Everywhere but the Cart and Checkout Pages

/**
 * @snippet       WooCommerce Hide Prices Except Cart / Checkout
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 5.1
 * @community     https://businessbloomer.com/club/
 */

add_filter( 'woocommerce_variable_sale_price_html', 'businessbloomer_remove_prices', 9999, 2 );

add_filter( 'woocommerce_variable_price_html', 'businessbloomer_remove_prices', 9999, 2 );

add_filter( 'woocommerce_get_price_html', 'businessbloomer_remove_prices', 9999, 2 );

function businessbloomer_remove_prices( $price, $product ) {
   if ( ! is_admin() ) $price = '';
   return $price;
}

“I don’t code – is there a reliable plugin for that?”

As many of you would love to code but don’t feel 100% confident with it, I decided to look for a reliable plugin that achieves the same (or even better) result.

In this case, I recommend the YITH WooCommerce Catalog Mode plugin. On top of hiding the Add to Cart buttons on the pages you like (free version), you can also hide prices, hide the Cart & Checkout pages, target specific products, replace the price with a contact form  and much more (premium version).

But in case you wish to code, keep reading ๐Ÿ™‚

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Disable Variable Product Price Range $$$-$$$
    You may want to disable the WooCommerce variable product price range which usually looks like $100-$999 when variations have different prices (min $100 and max $999 in this case). With this snippet you will be able to hide the highest price, and add a “From: ” prefix in front of the minimum price. At the […]
  • WooCommerce: Hide Price & Add to Cart for Logged Out Users
    You may want to force users to login in order to see prices and add products to cart. That means you must hide add to cart buttons and prices on the Shop and Single Product pages when a user is logged out. All you need is pasting the following code in your functions.php (please note: […]
  • WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages
    I’ve created a visual HTML hook guide for the WooCommerce Archive Page (which is the same page for the Shop, Category, Tag pages). This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can […]
  • WooCommerce: How to Remove the “Default Sorting” Dropdown
    If the WooCommerce product sorting functionality (“Default Sorting” dropdown) is a waste of space or you don’t need that select box at all, you may want to remove it. No matter if you prefer custom code or a simple plugin – hiding the product sorting dropdown is a piece of cake. Enjoy!
  • WooCommerce: Add Prefix / Suffix to Product Prices
    Sometimes you may want to add a prefix or a suffix to your prices. It could be something like “From…”, “Only…”, “…tax free” and so on. The first good news is this is very easy to do with a WooCommerce filter (remember, filters change the value of an existing variable, while actions add content). The […]

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

175 thoughts on “WooCommerce: Hide Prices on the Shop & Category Pages

  1. Thank you! Woocommerce support didn’t figrue this out after I spotted a bug that miscalculated the variable price of bookings that kept showing incorrect. “From Price” This worked for me ๐Ÿ™‚

  2. this is a great idea! Thanks for sharing , i never use price tag on my website

  3. Hello, I inserted the code snipped to the functions.php but the price is still displayed on the shop page. Any idea why?
    Thx for your help!
    Martin

    1. Hi Martin, i could be your theme or a custom plugin. If you temporarily switch to 2021 theme, does that work?

  4. Thank you so much for providing this snippet – it worked for me!

    1. Thanks for your feedback!

  5. The plugin is useless.

    1. YITH Catalog Mode? Why? Please share your feedback

      1. It does not work anymore here is the error syntax error, unexpected ‘remove_action’ (T_STRING)

        1. Simply contact their support and they’ll help you

  6. This worked for me, I used the display purchased products php snippet from this site then used CSS to remove the bits I didn;t want as below

    /*HIDE PRICE AND CART BUTTTONS FROM ACCOUNT PAGE*/
    *****change the post id to whatever you page id is**** you can use googles inspector or just look up your page id for this
    
    #post-2239 a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart, span.price, div.star-rating {
        display: none !important;
    }
    #post-2239 img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
        max-width: 50%;
    }
    
    1. Ok, but for sure there are simple PHP calls you can use for that too

  7. I need some help to customize my product page to add an extra button for WhatsApp chat and an inquiry form for a custom quote.

    1. Hi Amelia, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  8. how to hide prices from site ? can you share the best idea ?

  9. Thank you for providing the code snippet. It was very helpful
    Regards
    Stephen

    1. Cool!

  10. Hi. I’m wondering if it’s possible to only hide the price for specific product categories? From what I understand, this code will hide prices on the shop page for every product.

    1. Hey Patrick, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  11. Hi Rodolfo, I just tried the short snippet on my site and it works great. Thanks!

    1. Cool!

  12. Hi Rodolfo Melogli,

    I’ve seen that you respond to every single comment which is really great, I appreciate your efforts.
    Is there any way to hide the prices from Cart & Checkout pages too ?

    Looking forward.
    Thanks

    1. Hey Adnan, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  13. Hi,

    is it possible to hide all prices for a specfic group, but let them checkout (invoice) as normal, but without seeing any price?

    1. Hi Ben, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  14. Hi Rodolfo,

    how can i hide price just on product page?

    Thank you,

    Jan

    1. Hi Jan, look into remove_action() and https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/. Hope this helps

  15. Hi there,
    I tried your snippet using a snippet plugin as I don’t want to mess with the code files, but it didn’t work. Please can you check out my site and let me know why? Thank you!

    1. Hello Charlotte, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  16. Thanks for this snippet. It does the job of hiding price in the traditional woocommerce category and product pages but I can still see the price on AMP version of the product from amp plugin for some reason.

    1. Hi Wojtek, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  17. Hi, I am looking for solution, I have to type of customer first who buy direct form web and some customer I have who first inquire or want a demo about the product, I want to add an extra button with add to cart with the name BOOK free demo or Quick inquiry.. Kindly help me in this matter.

  18. hi, how can i apply this to shop and category pages but EXCLUDE ON SALE products? I mean, i want to hide prices in shop and category pages to replace it with an ACF field but still want to show the default price that appears crossed out with the on sale price on its right side.

    1. Hello Alejandro, thanks so much for your comment! Yes, this is possible – unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  19. Can we hide the “Out of stock” label displayed in the archive page of my shop with one of this codes as well? Can we hide the price per category also? Thanks for your response.

    1. Hello Joseph, thanks so much for your comment! Yes, this is possible – unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding! ~R

  20. Thank you for the PHP Snippet 2 is so great. Can you teach me how to Remove Prices Everywhere but only “the Checkout Pages”?

    1. Hello there, thanks for your comment! I suggest you take a look at “conditional logic”: https://businessbloomer.com/conditional-logic-woocommerce-tutorial/ and https://businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/. Let me know ๐Ÿ™‚

  21. Excellent code Rodolfo,

    We have developed a plugin for this that does some more wonders. Can you please review and give us a feedback on what do you this about this one?

    Regards

    1. Looks good to me, well done ๐Ÿ™‚

  22. Thanks a lot for this piece of code. Works wonders

    BUT it also removed prices on the back end. I cannot see the prices in the admin Products Dashboard anymore.
    Is there an other line of code to add to enable these in the back end?

    Thanks

    1. Hello Camille, thanks for your comment! I guess you used snippet #2 – in that case you might be right. I’ve now revised it, so try the new version ๐Ÿ™‚

  23. hello, what if i want to use the second snippet functionality, but still see the prices of a variable product when i select it? (the price that appear when i select a variable of a product from the drop down menu of the product page)

    Thanks

    1. Hello Mirko, thanks for your comment ๐Ÿ™‚ I suggest you take a look at “conditional logic”: https://businessbloomer.com/conditional-logic-woocommerce-tutorial/ and https://businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/. Let me know ๐Ÿ™‚

    2. I just wanted to comment to say that your snippet (Example 1) was exactly what I was looking for. Thank you so much for providing the solution!

      1. ๐Ÿ™‚

  24. Hello. Maybe you can help to hide title of products? I need price but I don’t need title. Is it possible to do with similar code?
    Thanku.

    1. Andrejs, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  25. Good morning,
    This code does not appear to work for the WP Astra or OceanWP theme, although it does work on twentyseventeen.
    Can you give me any ideas on what maybe wrong please?

    1. Hi David, thanks for your comment! All my snippets apply to “default” WooCommerce, so it could be those themes override WooCommerce functions and therefore you’re trying to hide something that has already been removed/moved. Unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  26. The code worked for me at removing the price on the Shop page. Thanks so much!

  27. Hi there! I have searched google, woo and more with no luck. Hoping you can help me. I want to remove the price on the CATEGORY pages only

    1. Hey Michelle, thanks so much for your comment! This snippet does exactly that ๐Ÿ™‚ Try it with a default theme instead and let me know if it works ๐Ÿ™‚

  28. I have a question related to this. I have a client that would like to be able to hide the price on certain products until the shopping cart. This is in order to follow MAP policies sent forth by a couple of his vendors. There is no way to handle this in woo-commerce, nor is there any plug-ins or extensions that are active, and updated that handle this. This code you provided works, but site wide. I only need it for select products. MAP seems to be a bit of a nightmare on the programming end. Any ideas?

    1. Hello Jane, thanks for your comment! I suggest you take a look at “conditional logic”: https://businessbloomer.com/conditional-logic-woocommerce-tutorial/ and https://businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/. You can apply my function only on specific pages – let me know ๐Ÿ™‚

  29. Thank you for this solution! I’m actually trying to “undo” some custom coding that was done to take the price off the shop page. I’ve looked and looked and can’t find any custom coding so that we can once again have the pricing show. Any thoughts would be appreciated! Thanks!

    1. Hello Deborah, thanks so much for your comment! Unfortunately this looks like custom troubleshooting work and I cannot help here via the blog comments. Thanks a lot for your understanding! ~R

  30. Hi Rodolfo – thanks for this snippet of code.

    I would like to hide prices on all pages except single product page and the cart. Currently with the snippet here the variable (or even non-variable product) price won’t display.

    Do you have any suggestions/code for that?

    Thanks,

    Martin

    1. Hello Martin, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  31. Hi,
    Great job, works verey well, but i need to remove price in my home, where i have features products listed.
    Is there a snippet for that somewhere that I can use?

  32. hello , i have pasted the code in function.php using editor
    but now m getting error
    This page isnโ€™t working

    currently unable to handle this request.
    HTTP ERROR 500

    please help me.

    1. Hey ๐Ÿ™‚ Code works fine so probably you’ve pasted something extra or something less (forgot a “;” or something). Sorry but can’t help with custom troubleshooting – take a look at this tutorial to see how to troubleshoot: https://businessbloomer.com/woocommerce-troubleshooting-mistakes-to-avoid/

  33. Hi, thank for that snippet ! and not just a simple “display:none” ….. seriously …….

    Could you please tell me how to use the Snippet 1 in a conditionnal ? I would like to remove prices from the shop page for all category product except one (here: my_product_category)

    Something like :

    if ( !has_term( ‘my_product_category’, ‘product_cat’ ) ) {
    remove_action( ‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_loop_price’, 10 );
    }

    Cheers
    Akal

    1. Hey Akal, thanks so much for your comment! I suggest you take a look at “conditional logic”: https://businessbloomer.com/conditional-logic-woocommerce-tutorial/ and https://businessbloomer.com/woocommerce-conditional-logic-ultimate-php-guide/. Let me know ๐Ÿ™‚

  34. LOL you took a chainsaw to a twig, just add CSS display:none

    1. Chris, thanks for your comment! With CSS “display:none” I can still see the price from the page source and inspect element. It’s still loading, but is hidden. With PHP “remove_action” doesn’t load at all, which is faster and more efficient. Just so you know ๐Ÿ™‚

  35. Works great! Thank you!

    1. Thanks Marianne ๐Ÿ™‚

  36. Yes that worked! You’re the best

  37. Woooowwww Thank you so much, I just saw this now while searching on google, for a week now I am trying to get this done for my client.
    Thank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    1. Thank you Ali ๐Ÿ™‚

  38. Thanks .. Works smoothly ๐Ÿ™‚

    1. Thank you so much Mohtashim!

  39. Hello sir I want to remove price from all the pages like cart checkout shop can you help me? :/

    1. Hey Bhavarsh thanks for your comment! Unfortunately this is custom work and cannot help you – hope you find a solution ๐Ÿ™‚

  40. Hi,

    This is a great article and outstanding support Rodolfo. However my problem is we are able to hide the price on the website however in the search engines it is showing it. Is there a way to hide this?

    Thanks and appreciate your feedback!!!

    1. Roger, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here on the blog. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding! ~R

  41. You Rock! Works perfectly. Thank you

    1. Thank you Joe, your feedback rocks too!

      1. Hello Joe, For some reason, the snippet did not work on my website. Any ideas why this is happening. Please help. Thanks

  42. I’ve looked everywhere for guidance on this… but this was the only code I found that worked! Thanks

    1. Excellent, thank you Allan!

  43. Hello. Great article very usefull.

    i have a question, what represent the last two numbers in the add_filter function. is the product id or price or something like that. im still learning new things while im working with wordpress and wooCommerce

    1. Hey Ramses, thanks for your comment! No, it’s called the “priority”, take a look at the documentation here: https://developer.wordpress.org/reference/functions/add_filter/

  44. Thank you! ๐Ÿ™‚

    1. You’re welcome Mark!

  45. Rodolfo,
    Thank you very much for providing such a great website and tech support to the community
    I used one or two of your hints to create my website and i have a question regarding an idea i have to display a single price.
    I tried to display a single price on the product archive page where it shows the price range from $160-$150 i would like to display something like
    “as low as $ 15”
    The reason for that is, i have used the variable product where there are 3 different options to choose from and the lowest price is $15 in that bundle (it is a subscription for a service)
    As an example
    one day, 8 hours, $20 each hour = $160
    two days, 8 hours, 17 each hour = $272
    three days, 8 hours, 15 each hour = 360
    in my opinion if a customer looks at the price of 160 he doesn’t get the big picture and thats the reason i would like to display it like “as low as $ 15”
    I would really appreciate your help
    Regards
    Marco, Calgary, Canada

  46. Hi, can you advise on how i can remove the product name as well. I just want the shop page to show the image with the ability to add to cart.

    Also, do you know how to “skip” the product page and go right from the shop page to the cart. So if they click the image on the shop page, add it to the cart, then take to the cart page.

    1. Hey Josh, thanks for your comment!

      You can remove the product title by taking a look at the default hooks that WooCommerce adds on the loop, and then use remove_action to hide that (hooks: https://businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/; video tutorial: https://businessbloomer.com/customize-shop-page-woocommerce/).

      In regard to your second question, that’s pretty “unfair” to the user in relation to User Experience. I’d totally recommend not to implement that, as users are clicking to see an image and definitely not to add a product to cart (unless the image itself has a “+” somewhere or an “add to cart” inside the image).

      Hope this helps!

  47. Hi Rodolfo

    Aclient wants me to take off prices from the products. What do I do?

    1. Eric, thanks so much for your comment! I don’t usually provide free advice here on the blog, however this should be super easy. Take a look at this reference https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/ and then use:

      remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
      

      Let me know ๐Ÿ™‚

  48. Hello, where i need to put the code, in order to hide the prices??

    Regards

    1. Hey Ricardo, thanks for your comment! You can place this in your child theme’s functions.php file – if you need more guidance, please take a look at this video tutorial: “How to Customize WooCommerce with PHP Snippets (even if you don’t know PHP)“. Hope this helps!

  49. Hello Rodolfo,

    We are using Zerif Lite theme. We have variable products category (let’s say – Custom Products) and simple products categories which we are showing on Shop Page (We are not showing Custom Products on Shop Page)

    Now, we need to:

    Hide Price Range and Quantity Option on Variable Product Page –
    Show Price and Quantity Option on Simple Product Page.

    Please let me know if you need more clarity on this.

    1. Hey Rohit, thanks so much for your feedback and comment!

      Yes, this is possible of course – but unfortunately this is custom development work and I cannot provide this solution on the blog right now. I will add it to my to-write list but I cannot guarantee I will be publishing this before 2-3 months.

      If you would like to get a quote for the fix, feel free to go here to get in touch.

      Thanks for your understanding!

      ~R

  50. Hello Rodolfo. I made a plugin that do the same. It can remove or rearrange functions from single product page and shop page. I didn’t think neccesary add options to remove functions with conditionals, but after read the comments, I’m going to add it. Here you and everyone can download the plugin (it was added to wordpress repository, so obviously it’s free) WooEnhacer – WooCommerce Customizer I hope it will be useful for more than anyone.

    Great site by the way.

    Greetings!

    1. Hey Miguras, thanks for your comment and best of luck with your plugin ๐Ÿ™‚

  51. hi there,

    i try everything including from the comment, it hide the price on the page, but on the shop page (woocommerce setting – shop page), the label PRICE still showing up. the widget product also show the price after putting the snippet code 2

    can you help me?

    i put under the function, not working, search for loop, the themes not there, download code sniipet plugin and insert the code, not working, is that anyway to hide the price label (the price tag) using css?

    please help and thank you

    1. Hey Andy, thanks for your comment! Can you send me your website URL so I can take a quick look? Cheers ๐Ÿ™‚

  52. Hi Rodolfo

    I was wondering if you could help – we seem to be having the opposite problem in that we cannot get any prices to display on our shop or category pages. We have used your snippet to hide the price on the product page. We are doing this because we are using TM Extra Product Options which generates a final total price. I took off the snippet to see if it made a difference but nothing changed. Would you have a snippet we can use to re-instate prices on shop and category/tag pages? Thanks so much in advance ๐Ÿ™‚

    1. Hello Louise and thanks for getting in touch ๐Ÿ™‚ Possibly, your WordPress template does not display prices in the WooCommerce “loop” (shop / category pages). Have you tried with this already:

      
      // Add prices to loop
       
      add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 11 );
      
      

      Let me know ๐Ÿ™‚

      1. Hi Rodolfo thanks so much for the fast reply. I pasted that snippet into the theme’s functions.php file unfortunately the prices are still missing from our shop page. Using the browser’s inspection tool I can see that the span that normally holds the price is not being inserted at all. Because we have so many files (both theme and woocommerce), would you know which template file (theme or woocommerce) is the culprit? I have another website using the same theme, woocommerce and plugins but its prices are appearing as normal on the shop page. I also checked the css file and there is nothing there unusual with regards to the price styling/display. Thanks so much in advance for your help ๐Ÿ™‚

        1. Hello Louise, the template file would be the “content-product.PHP” within the WooCommerce templates folder. However, your theme might override that.

          Now, when you say “I have another website using the same theme, WooCommerce and plugins but its prices are appearing as normal on the shop page”, this makes me think you should also check if they’re running the same versions. If files are identical it’s almost impossible you’d get the issue, so probably the theme is out of date or WooCommerce is running a different version?

          1. Hi Rodolfo,

            The two websites are both running WordPress 4.4.2 and the same version of Satellite 7 with Woocommerce. However both have been further customised differently. The one I am having trouble with we have done a lot of work on so I think thats why it is having more trouble then the other, more basic website.

            Here is the price function from the file you mentioned:

            /**
             * woocommerce_after_shop_loop_item_title hook
             *
             * @hooked woocommerce_template_loop_rating - 5
             * @hooked woocommerce_template_loop_price - 10
             */
                  do_action( 'woocommerce_after_shop_loop_item_title' );
                ?>
            
            	</a>
            
            	<?php
            

            I’ve made sure that there are no snippets for the price inside the functions.php, I’ve also double-checked the CSS.

            1. Thanks Louise! Difficult to troubleshoot without having access to the files, but I’m afraid that file looks fine. Can you make a file search for “woocommerce_after_shop_loop_item_title” to see if something is removing it or customizing it?

              Also, please disable all plugins but WooCommerce to see if that fixes it ๐Ÿ™‚

          2. Hi Rodolfo, thats fixed! Thank you for your help and patience! It was a Request a Quote plugin that was hiding the prices

            1. Awesome ๐Ÿ™‚ I should have asked that first! anyway, have a great day and hope to see you at our next Live WooCommerce Class (some time in April). ~R

          3. We’ll definitely be there Rodolfo ๐Ÿ™‚ Thanks again for all your help!

  53. Is it possible to remove all prices? The shop is for internal use and prices are not applicable.
    I do need schipping and I do need a cart, but they don’t buy, they just order and we ship.

    1. Hello Dennis, thanks so much for your comment ๐Ÿ™‚ Yes, what you’re asking is definitely possible. Snippet 2 should send you in the right direction, plus some more customization would be required to hide prices on the Cart and Checkout page.

      Also, you could simply put all the product prices to “0.00” and hide the “Free!” notice. What have you tried so far?

      1. Prices are on 0 and Free is gone, but like on the side bar I have the cart, which is good for the users to see what they order, but I would be glad when the price is gone. The same in every stage, as I don’t the price at all it’s just eating up space.

        1. I understand. Yes this is possible via PHP but would require development time that I cannot provide here in the comments I’m afraid.

          Have you tried via CSS or do you prefer PHP? With CSS, you could simply use something like:

          
          .amount {
          display: none
          }
          
          
          1. You lose the price, but not the space. I understand that it will take a lot of customizing, so I will leave it for the moment, get busy with the next challenge and look at some of your videos.

            Thanks for your time and advice.

            1. Thank you Dennis, your feedback is much appreciated ๐Ÿ™‚

  54. Thank you ery much Rodolfo… this short action is very usefull. Now, I save $15 for this tips. ๐Ÿ™‚

    1. Awesome! Delighted to hear this ๐Ÿ™‚

  55. hello in my them price display in shop page but not display in product category page it’s come with error

    Fatal error: Call to a member function get_price_html() on null in C:\xampp\htdocs\flower\wp-content\themes\flowvin\woocommerce\archive-product.php on line 73

    1. Thanks for your feedback and yes – you’re right ๐Ÿ™‚ I just edited the second snippet: the correct function declaration is “function businessbloomer_remove_prices( $price, $product ) {“… it was missing the second variable ($product). Try this version and let me know ๐Ÿ™‚

  56. Hi Rodolfo, I tried to remove prices with your snippet but unfortunately it does nothing. I’m using a child-theme and adjust the functions.php. Can you tell me what i’m doning wrong?
    Regards, Michel

    1. Hi Michel, thanks for your message ๐Ÿ™‚ It could be your particular theme is already “acting” on that specific hook and changed it’s priority. Or, that we’re removing the action before it gets added.

      for the first potential issue, look in your theme’s files if there is any function that already does: remove_action( ‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_template_loop_price’, 10 ). Possibly, they’re removing that and adding it back in a different position and with a different function name. You’ll need to remove this new one in case.

      Otherwise, try using:

      
      /**
       * @snippet       WooCommerce Hide Prices on the Shop Page
       * @how-to        Get CustomizeWoo.com FREE
       * @sourcecode    https://businessbloomer.com/?p=406
       * @author        Rodolfo Melogli
       * @compatible    WooCommerce 2.4.7
       */
      
      // Remove prices after theme setup
      
      add_action('after_setup_theme', 'bbloomer_remove_action_later');
      
      function bbloomer_remove_action_later() {
      remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
      }
      
      
      1. Hi thnx for your reply. I found this remove_action.php file and tried to use your code without succes. What can i do next?

        array(
        array(‘woocommerce_catalog_ordering’, 30),
        array(‘woocommerce_result_count’, 20)
        ),
        ‘woocommerce_after_shop_loop_item’ => array(
        array(‘woocommerce_template_loop_add_to_cart’, 10),
        ),
        ‘woocommerce_before_main_content’ => array(
        array(‘woocommerce_breadcrumb’, 20),
        ),
        ‘woocommerce_before_shop_loop_item_title’ => array(
        array( ‘woocommerce_show_product_loop_sale_flash’, 10 ),
        array( ‘woocommerce_template_loop_product_thumbnail’, 10 )
        ),
        ‘woocommerce_after_shop_loop_item_title’ => array(
        array( ‘woocommerce_template_loop_price’, 10 ),
        array(‘woocommerce_template_loop_rating’, 5 )
        ),
        ‘woocommerce_sidebar’ => array(
        array(‘woocommerce_get_sidebar’, 10),
        ),

        ‘woocommerce_single_product_summary’ => array(
        array(‘woocommerce_template_single_title’, 5),
        array(‘woocommerce_template_single_price’, 10),
        array(‘woocommerce_template_single_excerpt’, 20),
        array(‘woocommerce_template_single_add_to_cart’, 30),
        array(‘woocommerce_template_single_meta’, 40),
        array(‘woocommerce_template_single_sharing’, 50),
        array(‘woocommerce_template_single_rating’, 10 )
        )

        );

        1. Yep ๐Ÿ™‚ It seems your theme removes all the WooCommerce actions (this is pretty bad practice, what theme are you on?). Anyway, if actions are removed, they must be added back somewhere else. Go look for add_action(‘woocommerce_after_shop_loop_item_title’,’_f_’,’_n_’) to see if they have changed the priority (n) or the name of the function (f). Then, remove that exact action ๐Ÿ™‚

          1. I am using ducan, seems to be one of the best themes for webshops i read. https://themes.webinane.com/wp/ducan/. I will try that once more. get back to you.

          2. Is this the one you mean?

            /**
            * WooCommerce Template Hooks
            *
            * Action/filter hooks used for WooCommerce functions/templates
            *
            * @author WooThemes
            * @category Core
            * @package WooCommerce/Templates
            * @version 2.1.0
            */

            1. No that’s the WooCommerce one. If your theme remove_action, than it must have another function somewhere that adds the prices where they show now ๐Ÿ™‚

          3. I found this in the theme itself. What should i do?

            get_price_html()):?>
            get_price_html(); ?>

            <meta itemprop="priceCurrency" content="” />
            <link itemprop="availability" href="https://schema.org/is_in_stock() ? ‘InStock’ : ‘OutOfStock’; ?>” />

            1. In this case, the ideal thing to do would be to either hide prices via CSS (easy, not technically great) or creating a child theme override where you delete the PHP lines that create the prices as per your example. Hope this helps ๐Ÿ™‚

  57. Thank You! You Great!

    1. Awesome! Thank you so much ๐Ÿ™‚

  58. Works great! I was trying to figure it out myself with out any luck! Also used code snippets to put into functions so theme update wont mess it up again…lol! I will have to put note to “add to cart to see price”!

    1. Many thanks “the leather guy” ๐Ÿ™‚ Feedback is much appreciated!

  59. Thank You! This works perfect

    1. Thanks Andy for your feedback! Much appreciated ๐Ÿ™‚

  60. Hi i used this code but it dint hide price for me at all .
    could you please help me out i been stuck on this for days now
    https://www.varmepumpe-rr.no/ I want to remove all the prices on this website. as all i need is just a product pages. could you please direct me in right path?

    1. Tomas, have you tried using this free plugin: YITH Catalogue Mode? That should do the trick ๐Ÿ™‚

  61. Hello. I am using the plugin Composite Products, and Catalog Visibility Options (CVO). The point of the shop, is to sell “Party Packages” where some products are bundlet (hence the Composite Products-plugin), and disable the possibility to buy the items in the packages individually. So I have a fre question:

    First: The CVO-plugin hides the prices on individual items fine, in the shop page. But in the cart the price of the individual items along with the sub-total of them are still showing. I only want the total price of the composite product package. How to hide the other prices?

    Second: Can i Disable the option to “add-to-cart”, ONLY on single products and not the composite products?

    I hope you can help me, because I am really lost.

    1. Sorry, this is way too custom and I can’t help. I will publish your comment to see if anyone here can help you ๐Ÿ™‚ Good luck!

  62. I’ve added to functions.php and price still appears in shop/category pages. Does this work with newer versions of woocommerce? might it be superceded by something else in the theme i use?

    1. Thanks for your feedback! Yes, that’s a possible cause. Check if your theme already removes the woocommerce_template_loop_price function and assign it with a different priority. Let me know! R

  63. Hi! How to make the price(not range) for variation product function for the shop page only?

    1. Hey Dav thanks for your feedback! You can simply use the is_shop() conditional tag:

      if ( is_shop() ) {
      // run function here
      }

  64. I have a stupid question.. where do I put this snippet of code to remove the prices? Sorry.. just didn’t see this.

    1. Hello Marie! You have to place the snippet at the bottom of your theme’s function.php file. Otherwise, I recommend installing a plugin called “Code Snippets” where you can even enable/disable the snippet whenever you like. Hope this helps!

  65. snippet 2 worked like a charm. the best!!

    1. Thanks for your feedback Jake!

  66. Great and simplest solution. Please help in removing price from Checkout , cart as well. I am developing a book library and using cart for ordering books only. No payments. I really appreciate your help to the community.

    1. Thank you Santosh! This looks more like you want to use WooCommerce as a catalogue, there is a plugin for that. Hope this helps!

      1. Thanks for the suggestion. I worked it out with hiding in css of my child theme.
        I wanted to hide price and keep Add To Cart option on. This way our readers can order books to read and return.

        Thanks Again

        1. Great to hear that Santosh ๐Ÿ™‚ Thanks for your feedback!

        2. Hi Santosh,

          I am looking for a solution like you described (library books) I already bought the WC Catalogue Visiblity Options plugin, but unfortunately it doesn’t do the trick.

          I managed to hide the prices on the single product page with custom CSS. Could you please provide me with the exact CSS snippets to hide prices all over WooCommerce (cart, checkout)?

          Thank you very much in advance!

  67. is there a way to hide prices on items that have soldout? we have fine art pieces we want to keep on the site even though they sold. really am learning a lot from your posts. Thanks.

    1. Scott, thanks a lot for your message. Interesting question and funny how you asked this: I’m working with an art gallery that has the exact same problem, and I’m currently developing a function to achieve that. For now, you could simply use this PHP function to check if the product is not in stock and then execute some PHP inside it:

      global $product;
      if ( ! $product->is_in_stock() ) {
          // PHP here will be executed when out of stock
      }
      

      Let me know if this helps ๐Ÿ™‚

      1. Thanks for quick reply. I will look into this. I am far from a programmer and was hoping for a nice drop in or easy fix. Always good to have a challenge though. Thanks again for the feedback.

      2. Hello,

        I’m looking for the same solution for the same problem.
        Will it works to combine your 2nd snippet with this code, like that :

        global $product;
        if ( ! $product->is_in_stock() ) {
            // PHP here will be executed when out of stock
        add_filter( 'woocommerce_variable_sale_price_html', 'businessbloomer_remove_prices', 10, 2 );
        add_filter( 'woocommerce_variable_price_html', 'businessbloomer_remove_prices', 10, 2 );
        add_filter( 'woocommerce_get_price_html', 'businessbloomer_remove_prices', 10, 2 );
        }
         
        function businessbloomer_remove_prices( $price, $product ) {
        $price = '';
        return $price;
        }
        
        
        1. Franck, thanks for your comment! I’m afraid I cannot offer support to free subscribers. Anyway, for sure, I can tell you that won’t work written like that ๐Ÿ™‚ Thanks a lot for your understanding! ~R

  68. Thanks Rodolfo for the code.
    Same as lars I too would like to remove prices everywhere and replace the add to cart functionality to add to quote.
    Can this be done?

    Thanks in advance

    1. Thanks for the feedback Himanshu. Take a look at this WordPress plugin: WooCommerce Email Inquiry & Cart Options – hope this helps!

  69. Thank you for sharing this code snippet. It was very helpful and effective at removing the prices from my category pages. I think it is a bad idea to show the price of an item before you’ve had a chance to explain it’s benefits and features. My theme had a ‘custom_functions.php’ file that I pasted your code into. Worked like a charm!

    1. Thanks for your feedback Anna, very much appreciated!

  70. Hi, this is great stuff, no plugins needed.

    Say that I want to hide prices everywhere on a site, including cart, checkout, my account, everywhere.

    Is there a snippet for that somewhere that I can use?

    1. Thanks for your query Lars. I have a question for you first: do you want to disable ecommerce checkout fully given that you’re asking to remove prices everywhere? Otherwise, if you still want to have people pay online, you’ll need to show prices on the checkout at least. Maybe let me know why you need that ๐Ÿ™‚

      1. I could use a solution to remove prices from cart, checkout, my account etc. On our site all products are free for those who qualify. Its an award program. So people have to choose their products and checkout, but they are charged nothing, the companies who are giving the awards pay for the products. So I would prefer to be able to remove all prices.

        1. David, thanks for your inquiry. What I would do if I were you, I would automatically apply a coupon that gives 100% discount if the logged in user qualifies for the program. You can take a look at this post of mine to get an idea. Hope this helps!

  71. Hi, I think this is a great idea! However, I tried the code and it did not work on my wordpress site. The prices are still showing on my product category page.

    1. Lia, thanks so much for your comment! I added a second snippet that removes the prices everywhere, check it out and let me know if it works for you ๐Ÿ™‚

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *