wp wc php use comma separated thousands

  1. Open your WordPress website's functions.php file.
  2. 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;
}
  1. Save the file, and the thousands separator in the prices on your WooCommerce products will now be displayed as comma separated.