WPPIZZA_DECIMALS

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #12152
    Olly
    Admin & Mod

      what it does:
      allows you to distinctly set the number of decimals for any prices / monetary values.

      for most currencies, this is unnecessary as you can choose – in layout – to either display decimals or not (i.e 2.54 or just 2). However, there are some – though very few – currencies that typically use 3 decimals for which this constant is designed (in which case the value should be set to 3 ). However, if for example you wanted to use only one decimal for some reason, you could also set the value to 1.

      affects:
      number of decimals displayed for prices / monetary values

      usable:
      anytime, can also be changed or deleted again at any time.
      however, changing/deleting this constant will not change values in already existing orders

      example:

      
      define('WPPIZZA_DECIMALS',3);/*integer >=0 */
      

      where to add/define:

      in your wp-config.php before:
      /* That's all, stop editing! Happy blogging. */

      Disclaimer:
      As with all filters, actions and constants:
      Although these should be safe to use as indicated, there are no guarantees. Use at your own risk. Make backups before usage.

    Viewing 1 post (of 1 total)
    • The topic ‘WPPIZZA_DECIMALS’ is closed to new replies.