wp wc php use comma separated thousands
- Open your WordPress website's functions.php file.
- Add the following code to use comma separated thousands in PHP:
add_filter( 'wc_price_args', 'custom_wc_price_args' );
function custom_wc_price_args( $args ) {
$args['thousand_separator'] = ',';
return $args;
}
- Save the file, and the thousands separator in the prices on your WooCommerce products will now be displayed as comma separated.