get_display_price()
get_display_price(\WC_Product $product, boolean|string $show_range = true, boolean $show_sale_price = true) : string
Get the display price for a product. Similar to WC_Product->get_price_html() but without any price suffix.
Parameters
\WC_Product | $product | The product object. |
boolean|string | $show_range | Applies to variable products only. Whether to show the range of prices (e.g. £2.00 - £4.00). true - show full price range for variable products; false - show minimum price only; 'short' - show minimum price appended with "+". |
boolean | $show_sale_price | Applies if product is on sale. true - show the regular price struck out before the sale price; false - just show the sale price. |
Returns
string —The display price.