Support » Plugin: WooCommerce » Prices and Weights Have Different Formats

  • Resolved Bolder Elements

    (@hystericallyme)


    Has this always been the case, or was it a recent change I missed in the changelog:

    A client has selected a period thousands separator, and a comma decimal separator. When entering a price for a product, it must use the comma decimal separator as chosen. However weights and dimensions require a period no matter what you have chosen.

    That seems really confusing, and I feel like it is new. I wrote a plugin last year that was meant to work with either formatting. To put the trouble briefly, it has a select box that allows you to choose a condition of Price, Quantity, Weight, and Volume. Then in the text box next to it they put their desired number for comparison. This worked fine last year, but it has come to my attention that it no longer does because my plugin always sanitizes the number field using the WooCommerce functions. This means it saves all 4 of those with a comma decimal separator. But now the comparison doesn’t work because WC requires a period, and my plugin requires a comma.

    I hope I explained that well enough, I would just like to know why that is. Why can’t a customer enter the numbers per their settings for all number based fields? It’s causing quite a headache in terms of setting up their shipping with my plugin 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prices and Weights Have Different Formats’ is closed to new replies.