get_woocommerce_price_format()
Get the price format depending on the currency position.
Description Description
Return Return
(string)
Source Source
File: includes/wc-formatting-functions.php
function get_woocommerce_price_format() {
$currency_pos = get_option( 'woocommerce_currency_pos' );
$format = '%1$s%2$s';
switch ( $currency_pos ) {
case 'left':
$format = '%1$s%2$s';
break;
case 'right':
$format = '%2$s%1$s';
break;
case 'left_space':
$format = '%1$s %2$s';
break;
case 'right_space':
$format = '%2$s %1$s';
break;
}
return apply_filters( 'woocommerce_price_format', $format, $currency_pos );
}