Title: Thousand separators
Last modified: January 28, 2019

---

# Thousand separators

 *  Resolved [eiriksnilsen](https://wordpress.org/support/users/eiriksnilsen/)
 * (@eiriksnilsen)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/thousand-separators/)
 * Hi,
 * Thanks for a brilliant plugin. I think possibly Magento sends the price with 
   the comma as thousand separator – is there any way to change this in WordPress/
   the Mag Products plugin?
 * Cheers,
 * Eirik
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fthousand-separators%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [santerref](https://wordpress.org/support/users/santerref/)
 * (@santerref)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/thousand-separators/#post-11166747)
 * Hi [@eiriksnilsen](https://wordpress.org/support/users/eiriksnilsen/),
 * There are no options or attributes available with the shortcode at the moment
   to modify the thousand separators, however, you can use those filters to modify
   the output of the price :
 * mag_products_integration_product_final_price_without_tax
    mag_products_integration_product_regular_price_without_tax
 * More details here: [http://magentowp.santerref.com/documentation.html#filters](http://magentowp.santerref.com/documentation.html#filters)
 * Read here about number_format in PHP: [http://php.net/manual/en/function.number-format.php](http://php.net/manual/en/function.number-format.php)
 * `number_format ( float $number , int $decimals = 0 , string $dec_point = "." ,
   string $thousands_sep = "," ) : string`
 * Example:
 *     ```
       <?php
   
       // Do the same for both filters.
       add_filter( 'mag_products_integration_product_final_price_without_tax', 'my_theme_update_separator', 10, 4 );
   
       function my_theme_update_separator( $price_with_prefix_suffix, $prefix, $price, $suffix ) {
       return $prefix . ' ' . number_format($price, 2, '.', ',') . ' ' . $suffix;
       }
       ```
   
    -  This reply was modified 7 years, 4 months ago by [santerref](https://wordpress.org/support/users/santerref/).
    -  This reply was modified 7 years, 4 months ago by [santerref](https://wordpress.org/support/users/santerref/).
 *  Thread Starter [eiriksnilsen](https://wordpress.org/support/users/eiriksnilsen/)
 * (@eiriksnilsen)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/thousand-separators/#post-11170598)
 * Thanks mate – works as a charm. I am using these:
 *     ```
       mag_products_integration_product_final_price_with_tax
       mag_products_integration_product_regular_price_with_tax
       ```
   
 * Added this:
 * esc_attr( $atts[‘prefix’] ) . esc_html( number_format( $product[‘regular_price_with_tax’],
   0**, ‘,’, ”**) ) . esc_attr( $atts[‘suffix’] ), $atts[‘prefix’],
    -  This reply was modified 7 years, 4 months ago by [eiriksnilsen](https://wordpress.org/support/users/eiriksnilsen/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Thousand separators’ is closed to new replies.

 * ![](https://ps.w.org/mag-products-integration/assets/icon-128x128.jpg?rev=2595753)
 * [WP Storefront - Magento 2 Product Showcase](https://wordpress.org/plugins/mag-products-integration/)
 * [Support Threads](https://wordpress.org/support/plugin/mag-products-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/mag-products-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mag-products-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mag-products-integration/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [eiriksnilsen](https://wordpress.org/support/users/eiriksnilsen/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/thousand-separators/#post-11170598)
 * Status: resolved