Repository Forums Support WooCommerce Pricing Rules PRO How to show price 'From…' Reply To: How to show price 'From…'

#275
Soft79
Keymaster

Please note using that method, when upgrading the plugin your changes will be lost.

Version 1.0.4 introduced a filter for this, so you can do something like this in your themes’ functions.php:


add_filter( 'soft79_wcpr_min_max_price_html', 'soft79_wcpr_min_max_price_html', 10, 6 );
function soft79_wcpr_min_max_price_html( $new_price_html, $original_price_html, $product, $min_price, $max_price, $is_singular ) {
  $new_price_html = sprintf( _x( 'From %s', 'your-text-domain' ), wc_price( $product->get_display_price( $min_price ) ) ) . $suffix;
  return $new_price_html;
}