/**
  * Returns the price html for the pricing rules table associated with $product.
  * Ie:
  * * "From -$5 ft- Free!"
  * * "$5 ft"
  * * "Free!"
  * * etc
  *
  * @since 3.0
  * @param WC_Product $product the product
  * @return string pricing rules price html string
  */
 public static function get_pricing_rules_price_html($product)
 {
     $settings = new WC_Price_Calculator_Settings($product);
     $price_html = '';
     $price = $min_price = $settings->get_pricing_rules_minimum_price();
     $min_regular_price = $settings->get_pricing_rules_minimum_regular_price();
     $max_price = $settings->get_pricing_rules_maximum_price();
     $max_regular_price = $settings->get_pricing_rules_maximum_regular_price();
     $sep = apply_filters('wc_measurement_price_calculator_pricing_label_separator', '/');
     $pricing_label = $sep . ' ' . __($settings->get_pricing_label(), WC_Measurement_Price_Calculator::TEXT_DOMAIN);
     // Get the price
     if ($price > 0) {
         // Regular price
         if ($settings->pricing_rules_is_on_sale() && $min_regular_price !== $price) {
             if (!$min_price || $min_price !== $max_price) {
                 $from = wc_price($min_regular_price) . ' - ' . wc_price($max_regular_price) . ' ' . $pricing_label;
                 $to = wc_price($min_price) . ' - ' . wc_price($max_price) . ' ' . $pricing_label;
                 $price_html .= self::get_price_html_from_to($from, $to, '') . $product->get_price_suffix();
             } else {
                 $price_html .= self::get_price_html_from_to($min_regular_price, $price, $pricing_label) . $product->get_price_suffix();
             }
         } else {
             $price_html .= wc_price($price);
             if ($min_price !== $max_price) {
                 $price_html .= ' - ' . wc_price($max_price);
             }
             $price_html .= ' ' . $pricing_label . $product->get_price_suffix();
         }
     } elseif ('' === $price) {
         // no-op (for now)
     } elseif (0 == $price) {
         // Free price
         if ($settings->pricing_rules_is_on_sale() && $min_regular_price !== $price) {
             if ($min_price !== $max_price) {
                 $from = wc_price($min_regular_price) . ' - ' . wc_price($max_regular_price) . ' ' . $pricing_label;
                 $to = __('Free!', WC_Measurement_Price_Calculator::TEXT_DOMAIN) . ' - ' . wc_price($max_price) . ' ' . $pricing_label;
                 $price_html .= self::get_price_html_from_to($from, $to, '') . $product->get_price_suffix();
             } else {
                 $price_html .= self::get_price_html_from_to($min_regular_price, __('Free!', WC_Measurement_Price_Calculator::TEXT_DOMAIN), $pricing_label);
             }
         } else {
             $price_html .= __('Free!', WC_Measurement_Price_Calculator::TEXT_DOMAIN);
             if ($min_price !== $max_price) {
                 $price_html .= ' - ' . wc_price($max_price);
             }
             $price_html .= ' ' . $pricing_label;
         }
     }
     // set the product's price property to fix rich snippets
     $product->price = $price;
     return $price_html;
 }