get_woocommerce_price_format()
Get the price format depending on the currency position.
Hooks from the function
Return
String
.
Usage
get_woocommerce_price_format();
get_woocommerce_price_format() get woocommerce price format code WC 9.6.1
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 ); }