• Resolved gebbeth

    (@gebbeth)


    Hello,

    Nice plugin, thanks a lot, so the question is – if it’s possible (maybe with snippets) to not show “from” if only 1 variation exists/available?

    *By the way just to ask, when you use function “Change price, based on selected variation(s)” it is probably done with CSS I don’t know, so when you change between variation – anyway some “jumping” animation appears, so could it be done another way in further updates?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPXtension

    (@wpxteam)

    Hi,

    Unfortunately, this feature is not currently available. But it is a great idea.

    We will research this and will keep it on our to-do list.

    Thanks

    Thread Starter gebbeth

    (@gebbeth)

    Hello,

    Could be cool if you add this on later updates, but you think it cannot be done with snippets (for products with 1 variation)?

    Thanks.

    Plugin Author WPXtension

    (@wpxteam)

    Hi,

    Please place the below code at your current theme’s functions.php or use the code snippets plugin and add the below code as a snippet

    function remove_for_single_attribute($prices, $product, $price){
    	$num_of_variations = $product->get_available_variations();
    	if( count($num_of_variations) <= 1 ){
    		return $price;
    	}
    	return $prices;
    }
    
    add_filter('vpd_woocommerce_variable_price_html', 'remove_for_single_attribute', 21, 3);

    If it resolves your issue and found my support helpful, my humble request to you to write your beautiful thought here.

    Your beautiful thought will inspire us a lot.

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove “From” when only 1 variation available’ is closed to new replies.