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?
- Support forum for the Call for Price for WooCommerce.
- This topic has 3 replies, 1 voice, and was last updated 4 years, 11 months ago by
Tom Anbinder.
- AuthorPosts
- October 17, 2018 at 9:36 am #98739
Armen Rizal Rahman
GuestHi 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?
October 17, 2018 at 7:22 pm #98740Hi 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.
October 17, 2018 at 7:22 pm #98741Update: 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.
October 18, 2018 at 4:21 pm #98742Update2: 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.
- AuthorPosts
- You must be logged in to reply to this topic.