Home Forums Space themes support forum How to show “from MINIMUM PRICE” instead of price range?

How to show “from MINIMUM PRICE” instead of price range?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #540140

    Hello,

    where do I find the theme setting to only show minimum price for variable products?

    In Woodmart it is Theme settings >> Shop >> Variable Products >> Price.

    Thank youuu.

    #540290

    Luke Nielsen
    Keymaster

    Hello,

    Try to paste the code below into the functions.php file in your child theme, and recheck the issue.

    /*
    * Code Snippet to Display minimum price for WooCommerce variable products
    */
    
    if ( ! function_exists( 'xts_woocommerce_show_only_lowest_prices_in_variable_products' ) ) {
       function xts_woocommerce_show_only_lowest_prices_in_variable_products( $price, $product ) {
          $price         = '';
          return $price .= wc_price( $product->get_price() );
       }
       add_filter( 'woocommerce_variable_price_html', 'xts_woocommerce_show_only_lowest_prices_in_variable_products', 10, 2 );
    }

    Kind Regards

    #540343

    Hi Luke,

    thanks for the code. I know this but was thinking you have an option in the settings for it.

    Thanks.

    #540354

    Luke Nielsen
    Keymaster

    Hello,

    In future updates, we want to add such an option to the Space themes.

    Thank you for your time and have a good day!

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)