wc_format_price_range( string $from, string $to )
Format a price range for display.
Description Description
Parameters Parameters
- $from
-
(Required) Price from.
- $to
-
(Required) Price to.
Return Return
(string)
Source Source
File: includes/wc-formatting-functions.php
function wc_format_price_range( $from, $to ) { /* translators: 1: price from 2: price to */ $price = sprintf( _x( '%1$s – %2$s', 'Price range: from-to', 'woocommerce' ), is_numeric( $from ) ? wc_price( $from ) : $from, is_numeric( $to ) ? wc_price( $to ) : $to ); return apply_filters( 'woocommerce_format_price_range', $price, $from, $to ); }