Remove WooCommerce "From" price // Product Variations (5 posts)

  1. McAsh
    Posted 2 years ago #

    I'm having an issue with product variations in Woocommerce. Every time I create a product with variations, Woocommerce displays a "From" price on the product page. When you choose an option in the selectbox - for instance Medium size - another price displays with the actual price connected to your choice in the select box.

    I don't need to display the "from" price but it's wrapped in a <p> with a class of "price" which means I can't use display:none in the css as it will hide all prices on the entire site. I only need a price to be displayed when the user has made a choice in the selectbox.

    Can I add a snippet to functions.php file or somehow remove the from price element on product variations?

    Thanks for helping out.

  2. McAsh
    Posted 2 years ago #

    Anyone has a solution for this? Any help would be greatly appreciated. Thanks :)

  3. Ketixrei
    Posted 2 years ago #

    Enter the following code into your functions.php file:

    function custom_from($price){
    	return false;
  4. monchoz
    Posted 1 year ago #

    Dear Ketixrei, the code works great, thank you!
    However when I use this code I also remove price "form" from the catalog page.
    Is there a way to only remove the "from price" from the product page and display the "form" price on the catalog page?

    Thank you very much for your help!

  5. Louis de B
    Posted 1 year ago #

    Hi all, thanks for the support, I have tried the codes that works well to remove the from price, however it does not work with subscriptions products. Any ideas on how to remove the "from" price also on subscriptions products?

    I guess the filter needs to be different but I cannot find anything that would work!

    Thanks for your help

Topic Closed

This topic has been closed to new replies.

About this Topic