You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When thousand and decimal separator set to comma and dot then give_sanitize_amount works fine but if we change decimal separator to comma ( same as thousand separator ) then we will get worng goal amount. Since we give option to user to set custom separator then we have to handle this issue.
I have few questions:
Do we need to store formatted goal amount. Cann't we store this without formatted digit as we are doing for form earnings
1. Current `give_sanitize_amount` function only format amount on basis on current separator's value. Are we handling user case when user will change separator value after some time?
The text was updated successfully, but these errors were encountered:
@DevinWalker I researched about amount formatting issue. and I found that we should not use amount formatting in input fields ( goal and price both ), because we have to remove number formatting from amount whenever we will save them to database. In my opinion number formatting should be one way means whenever we need to display or for any other reason need formatting amount we can calculate it from decimal formatted amount ( we should use dot for decimal when storing value to database ), So we do not need to sanitize formatted amount.
Woocommerce is following same strategy when showing pre filled price or saving price to database
When thousand and decimal separator set to comma and dot then
give_sanitize_amount
works fine but if we change decimal separator to comma ( same as thousand separator ) then we will get worng goal amount. Since we give option to user to set custom separator then we have to handle this issue.I have few questions:
![screen shot 2016-07-07 at 12 06 53 pm](https://cloud.githubusercontent.com/assets/1784821/16644535/5362e4c6-443b-11e6-8286-d9cfecca3e22.png)
1. Current `give_sanitize_amount` function only format amount on basis on current separator's value. Are we handling user case when user will change separator value after some time?The text was updated successfully, but these errors were encountered: