Hello there, you can find a snippet for this here: https://gist.github.com/BFTrick/7643587
The “From” is not included in WooCommerce anymore and it’s only present in very old versions of it, or if the theme customizes the string to include it again.
Well I’m using elementor pro and woocommerce. So I’ve already added a snippet to remove the price range on variable products…
//Hide Price Range for WooCommerce Variable Products
add_filter( ‘woocommerce_variable_sale_price_html’,
‘lw_variable_product_price’, 10, 2 );
add_filter( ‘woocommerce_variable_price_html’,
‘lw_variable_product_price’, 10, 2 );
function lw_variable_product_price( $v_price, $v_product ) {
// Product Price
$prod_prices = array( $v_product->get_variation_price( ‘min’, true ),
$v_product->get_variation_price( ‘max’, true ) );
$prod_price = $prod_prices[0]!==$prod_prices[1] ? sprintf(__(‘From: %1$s’, ‘woocommerce’),
wc_price( $prod_prices[0] ) ) : wc_price( $prod_prices[0] );
// Regular Price
$regular_prices = array( $v_product->get_variation_regular_price( ‘min’, true ),
$v_product->get_variation_regular_price( ‘max’, true ) );
sort( $regular_prices );
$regular_price = $regular_prices[0]!==$regular_prices[1] ? sprintf(__(‘From: %1$s’,’woocommerce’)
, wc_price( $regular_prices[0] ) ) : wc_price( $regular_prices[0] );
if ( $prod_price !== $regular_price ) {
$prod_price = ‘‘.$regular_price.$v_product->get_price_suffix() . ‘ ‘ .
$prod_price . $v_product->get_price_suffix() . ‘‘;
}
return $prod_price;
}
This worked to eliminate the price range but then I was stuck with the prefix “from”. I added the snippet you shared but then the price was eliminated from everywhere on the site. So I’m assuming there’s a conflict somewhere?
Sorry I’m a newb.
Thanks for your help