WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Price-Appearance ("from") of Variable Products (3 posts)

  1. gaaaal
    Member
    Posted 5 months ago #

    Hi,

    before updating to the newest version of Woocommerce today, the prices of my variable products were shown as "From [ LOWEST PRICE]" and now there is written "[LOWEST PRICE] - [HIGHEST PRICE]".
    Is there any possibility to return to the old version? Can't find it :(

    Thanks a lot!!

    https://wordpress.org/plugins/woocommerce/

  2. AncaIO
    Member
    Posted 5 months ago #

    Hi,

    Try this, it worked for me.

    add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2);
    
    function custom_variation_price( $price, $product ) {
    $price = '';
    
    if ( !$product->min_variation_price || $product->min_variation_price !== $product->max_variation_price ) $price .= '<span class="from">' . _x('From', 'min_price', 'woocommerce') . ' </span>';
    $price .= woocommerce_price($product->get_price());
    
    return $price;
    }

    LE : place it in functions.php or a custom file that holds your woocommerce PHP customisations.

  3. sta777
    Member
    Posted 5 months ago #

    The above didn't work for me (grabbed the highest price, not the lowest), this does work :) - http://gerhardpotgieter.com/2014/02/13/woocommerce-2-1-variation-prices-revert-to-2-0-format/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.