Home Forums WoodMart support forum Hide “To” Price

Hide “To” Price

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #462600

    Akmal Baig
    Participant

    I enabled hide “to’ price. it is applied on the website. But there is a problem. I added a translate plugin to the website to allow whole-page translation with a single tap. It is not hiding any “To” prices in other languages. If there can be a custom code please provide it. Help quickly, please

    Attachments:
    You must be logged in to view attached files.
    #462687

    Hi,

    Please try adding the following Custom CSS in the Global Custom CSS area under Theme Settings >> Custom CSS

    .product-grid-item .price {
        display: none !important;
    }

    Best Regards.

    #462712

    Akmal Baig
    Participant

    The code hides all the product prices. I don’t want to sell them free 😂.
    I want to remove a price range and show only the lowest price in variations. I can do it completely fine by enabling (Hide “to” price) inside the theme setting. But it is only done for the default language “English”.
    When I translate the website using the translate buttons in the header, It shows the entire price range in translated version. but in “english” it is fine.
    Please give a solution.

    #462897

    Hello,

    I have visited your website and change the language it is working fine:
    Video for clarification:
    https://youtu.be/sGyZpOD7n0Y.

    If you have another behavior, please send me a video for a better understanding.

    Best Regards.

    #462904

    Akmal Baig
    Participant

    I disabled “theme options > Shop > Variable products” (Hide “to” price).
    Then I added the following custom code to the child theme function.php

    // Remove variable price range and display lowest price
    add_filter( ‘woocommerce_variable_price_html’, ‘custom_variation_price’, 10, 2 );
    function custom_variation_price( $price, $product ) {
    $price = ”;
    $price .= woocommerce_price( $product->get_variation_price( ‘min’, true ) );
    return $price;
    }

    The problem was resolved. The code is shared for others to get benefit as well

    #463011

    Hello,

    You are Most Welcome.

    We are glad that you managed to solve the problem yourself. You are Great!!!

    Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.

    Have a wonderful day.

    Topic Closed.
    Best Regards.

Viewing 6 posts - 1 through 6 (of 6 total)