How to make the call for price text appear on only one of the variable options?

Top WooCommerce & WordPress Plugins Forums Call for Price for WooCommerce How to make the call for price text appear on only one of the variable options?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #98739
    Armen Rizal Rahman
    Guest

    Hi Tom.

    I am trying out the plugin for my website. I wish for the call for price text to appear on only one of the variable options in my product: https://lavishvalley.com/product/olive-green-button-down-long-rayon-shirt/

    When I select, 2XL and above, the “Call for Price” text appears. But it also shows the price of the other products which is going to cause confusion.

    What can I do to rectify this?

    #98740
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Armen,

    Not sure that I understood it correctly, but if you mean “main” variable product price (i.e. price range – if you have different prices for variations, or single price if you have same prices for all variations), then I would suggest just hiding it with CSS. E.g.:

    p.price { display: none !important; }

    or with more specification:

    .single-product div.product-type-variable p.price { display: none !important; }

    Hope that helps and please let me know if I misunderstood you.

    #98741
    Tom Anbinder
    Moderator
    Plugin Support

    Update: As you have same prices for all variations, in addition to hiding main product price, you will probably need to force showing variation prices. This can be done by adding to your (child) theme’s functions.php file:

    add_filter( 'woocommerce_show_variation_price', '__return_true' );

    If you don’t want to do it manually (i.e. adding custom CSS and custom PHP) – please wait till I release next plugin version – I will add both these options (i.e. hiding main price and forcing showing variation price) there.

    #98742
    Tom Anbinder
    Moderator
    Plugin Support

    Update2: As promised, we’ve just released new plugin version 3.2.3. Now in “Advanced Options” settings section (in “WooCommerce > Settings > Call for Price > General”) there are two new options: “Main variable price” and “Force variation price”. If you enable both, your task should be solved (and you don’t need to add the code, I posted previously, manually). Please let me know if there are still any issues.

    P.S. If you like the plugin, please consider leaving us a rating.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.