Home › Forums › WoodMart support forum › Hide “To” Price
Hide “To” Price
- This topic has 5 replies, 2 voices, and was last updated 2 years ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
April 27, 2023 at 1:12 pm #462600
Akmal BaigParticipantI 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.April 27, 2023 at 4:24 pm #462687
Aizaz Imtiaz AwanKeymasterHi,
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.
April 27, 2023 at 5:08 pm #462712
Akmal BaigParticipantThe 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.April 28, 2023 at 10:00 am #462897
Aizaz Imtiaz AwanKeymasterHello,
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.
April 28, 2023 at 10:19 am #462904
Akmal BaigParticipantI 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
April 28, 2023 at 3:42 pm #463011
Aizaz Imtiaz AwanKeymasterHello,
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. -
AuthorPosts
- You must be logged in to create new topics. Login / Register