WooCommerce: Disable Grouped Product Price Range $$$-$$$
You may want to disable the Grouped product price range on the Shop and Single Product page. This usually looks like $100-$999. With this snippet you will be able to display “From: ” in front of the minimum price, or otherwise completely hide it ๐
Change the display of price range for Grouped Products
PHP Snippet #1: Change WooCommerce Grouped Product Price Range Format $$$-$$$
Please let me know in the comments if everything went as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting.
If you think this code saved you time & money, feel free to join 17,000+ WooCommerce Weekly subscribers for blog post updates and 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance!
Need Help with WooCommerce?
Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!
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.
57 thoughts on “WooCommerce: Disable Grouped Product Price Range $$$-$$$”
Aaron
Guess I should have save my name. Awesome work you’ve done here. Is there a way to handle product short descriptions on a grouped product? I am pulling in grouped products on a simple product page, and would like to show the product short description for each? Thanks in advance!
Hi Aaron, 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!
Hi Dom, 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!
Hi Rodolfo,
I’m trying to do something a little different,
I have mostly Simple Products & a few Variable Products.
Most of my Simple products have other price options which are coming in from a plugin, so these all just show 1 price.
the Variable ones obviously show the price range.
I am wanting all products on the shop page to just show 1 price (the lowest) as: “From: $xxx.xxx
I tried your snippet and it stopped almost all the products o my site from displaying on the shop page, for now I have just done this:
Hi Paul, 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!
Hey Danny, thanks for your comment! I just tested this again with 3.3.1 and it works perfectly. Maybe your theme (or another plugin) is messing/conflicting with my snippet?
Hi Rodolfo just had some time to revisit this now. I think its probably to do with the fact that I’m using a divi theme shop module and so the code does not apply – I suspect the ‘woocommerce_grouped_price_html’ bit !! ๐
Is there a way of altering the code to apply to this page/template? Your help much appreciated
Hey Danny, thanks so much for your comment! If my snippet work with another theme, then yes, it might be Divi or another plugin that are causing problems. Did you ask Divi for support?
This is not working for me, but I have no grouped products, I am using variable products, so I tweaked the snippet, but now the prices show as โฌ0!!! When I select all the options/variables of the product it gives me a final price, but I would like it to show “from โฌxxx” xxx being the minimum possible spend…
Thank you so much!! ๐ However it still removes the prices on everything that has variable pricing, until selecting the variables and then only shows a small price near “add to cart” button… ?
Hi Rodolo – this is nearly exactly what I’m after. I only want to show the price of the FIRST of the child products on single and category pages. This will also be the
max( $child_prices )
. Have tried to hack your code but without any luck – do you know if this is possible. Am working localhost so can’t show.
Renee, 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. I would recommend taking a look at what’s inside $child_prices to see if you can grab the first element of the array ๐ Thanks a lot! ~R
Thanks for the article. It’s also not working for me sadly, I have tried both snippets in my functions.php file in my child theme and it nothing changes. The price just show the samething on both the product page and any other page you can view the product (e.g. search, homepage etc..). Price remains the same format like this: “$8.59 โ $9.82”
John, thanks for your comment! It works on my Storefront test website, so maybe this is something related to your theme and/or plugins. If you disable everything but WooCommerce and switch theme, does this work?
Questions? Feedback? Support? Leave your Comment Now! _____
If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. 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 BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)
With 100,000 (and growing) monthly organic sessions, Business Bloomer is the most consistent, most active and most complete WooCommerce development/customization blog.
Of course this website itself uses the WooCommerce plugin, the Storefront theme and runs on a WooCommerce-friendly hosting.
Guess I should have save my name. Awesome work you’ve done here. Is there a way to handle product short descriptions on a grouped product? I am pulling in grouped products on a simple product page, and would like to show the product short description for each? Thanks in advance!
Hi Aaron, 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!
OOps — ignore previous comment from me.
My old eyes read a period as a comma.
It’s working great as written. Thanks again for all you do, Big R !!
Cool!
I am trying this on the latest WordPress and it does not seem to work direct copy
Weird. Tried even with a different theme and no other plugins active but Woo?
I get an error on line 4 Cannot redeclare function bbloomer_grouped_price_range_delete.
Sounds like you’ve also added the same snippet somewhere else?
This worked perfectly for me using the “Snippets” plugin, not directly editing the theme files. Thanks for sharing!
Ok cool
Hi Rodolfo,
I’m using $price_excl_tax and $price_inc_tax for pricing on our new website. Do you know how I could adjust the snippet to get it to work?
Thanks in advance and hope you’re keeping well ๐
Dom
Hi Dom, 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!
Hi Rodolfo,
I’m trying to do something a little different,
I have mostly Simple Products & a few Variable Products.
Most of my Simple products have other price options which are coming in from a plugin, so these all just show 1 price.
the Variable ones obviously show the price range.
I am wanting all products on the shop page to just show 1 price (the lowest) as: “From: $xxx.xxx
I tried your snippet and it stopped almost all the products o my site from displaying on the shop page, for now I have just done this:
But this is not exactly what I want as it drops the price to a new line & my few variable products will still clearly say
“From:
$xxx.xxx – $xxx-xxx”
Any tips on this?
Cheers,
Aaron.
I found one of your other blog posts (https://businessbloomer.com/woocommerce-add-prefix-suffix-product-prices/) and looks to have done the job for me ๐
Thanks!
Nice!
For me, it’s working for logged-in users, but not for logged-out.
Sounds like a cache issue?
It worked for me. thanks!
Cheers!
this code providing price after discount (if exist), how to get regular price?
thx
Hi Paul, 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!
I’m on WooCommerce 3.4.2 / WP 4.9.6 and PHP 7 โ it doesn’t work for me. May someone confirm?
Still works Fabio ๐
Hi,
Is this tested with 3.4.1 ?
Thanks
Yep Rojo, just tried it on WooCommerce 3.4.1 and it still works ๐
its not working
Hey Dante, thank you so much for your comment! I’m afraid it does work on WooCommerce 3.3.4 so you must have some other problem. Let me know ๐
Hello
Thanks for the snippet. Could you get Woocommerce to show “to price” instead of “from price” ? Just to display the highest price.
//Ken
Hey Ken, thank you so much for your comment! Yes, sure, you just need to slightly edit this snippet ๐
Hi
Not working now after Woo update to 3.3.1. Tried with TwentyFifteen them too and no joy !
Thanks
Not sure Danny ๐
Seems broken now with latest Woo
Hey Danny, thanks for your comment! I just tested this again with 3.3.1 and it works perfectly. Maybe your theme (or another plugin) is messing/conflicting with my snippet?
Also, take a look at this tutorial to see how to troubleshoot: https://businessbloomer.com/woocommerce-troubleshooting-mistakes-to-avoid/
Finally, can you try switching temporarily to “Twentyseventeen” or “Storefront” theme and let me know if it works?
Hope this helps!
R
Hi Rodolfo just had some time to revisit this now. I think its probably to do with the fact that I’m using a divi theme shop module and so the code does not apply – I suspect the ‘woocommerce_grouped_price_html’ bit !! ๐
Is there a way of altering the code to apply to this page/template? Your help much appreciated
Many thanks ๐
Hey Danny, thanks so much for your comment! If my snippet work with another theme, then yes, it might be Divi or another plugin that are causing problems. Did you ask Divi for support?
Hi Sir,
How to work this in product page only, do have any code snippet for this? ๐
Thank you!
Hey Val, 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 ๐
Worked for me. Thank you.
Excellent ๐
Works perfectly !! Thanks
Thank you Miki ๐
Hi
This is working but i want to remove only First Price like ($$$-$$$) in this i want only first price not all.
thanks for help
Sorry Malik, this is not clear to me. Can you link to a screenshot so I can understand if this is a bug or not? Cheers
thank you, Rodolfo
the code worked like a charm for me. pasted the code in functions.php in child theme
Excellent, thank you Jagan!
Thank you!
No… thank YOU! ๐
This is not working for me, but I have no grouped products, I am using variable products, so I tweaked the snippet, but now the prices show as โฌ0!!! When I select all the options/variables of the product it gives me a final price, but I would like it to show “from โฌxxx” xxx being the minimum possible spend…
Ahhhh… gotcha! For variable products use: https://businessbloomer.com/disable-variable-product-price-range-woocommerce/ ๐
Thank you so much!! ๐ However it still removes the prices on everything that has variable pricing, until selecting the variables and then only shows a small price near “add to cart” button… ?
Hey Reese, is this referring to the variable snippet? If yes please re-post the comment there ๐
Hi Rodolo – this is nearly exactly what I’m after. I only want to show the price of the FIRST of the child products on single and category pages. This will also be the
. Have tried to hack your code but without any luck – do you know if this is possible. Am working localhost so can’t show.
Renee, 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. I would recommend taking a look at what’s inside $child_prices to see if you can grab the first element of the array ๐ Thanks a lot! ~R
Hi Rodolfo,
Thanks for the article. It’s also not working for me sadly, I have tried both snippets in my functions.php file in my child theme and it nothing changes. The price just show the samething on both the product page and any other page you can view the product (e.g. search, homepage etc..). Price remains the same format like this: “$8.59 โ $9.82”
Any ideas? Thanks
John, thanks for your comment! It works on my Storefront test website, so maybe this is something related to your theme and/or plugins. If you disable everything but WooCommerce and switch theme, does this work?
this snippet (nr1) doesnt work for me ๐
Thanks for your comment Demian! What doesn’t work – do you get an error? Can you provide a screenshot? Cheers ๐