Download the PHP package arraypress/wp-money without Composer
On this page you can find all versions of the php package arraypress/wp-money. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download arraypress/wp-money
More information about arraypress/wp-money
Files in arraypress/wp-money
Download arraypress/wp-money
More information about arraypress/wp-money
Files in arraypress/wp-money
Vendor arraypress
Package wp-money
Short Description Integer-minor-unit money formatting and parsing for WordPress. 136 currencies with the correct decimal exponent, so the twenty that are not two decimal places are right.
License GPL-2.0-or-later
Homepage https://github.com/arraypress/wp-money/
Package wp-money
Short Description Integer-minor-unit money formatting and parsing for WordPress. 136 currencies with the correct decimal exponent, so the twenty that are not two decimal places are right.
License GPL-2.0-or-later
Homepage https://github.com/arraypress/wp-money/
Please rate this library. Is it a good library?
Informations about the package wp-money
WordPress Money
Money as integer minor units, formatted correctly for 136 currencies.
What it does
Storing money as a float is how a total ends up at £9.999999999. Storing it as an integer number of pence is correct, but then every currency needs its own rules: yen has no decimal places, Kuwaiti dinar has three, and Hungarian forint takes a payout only in whole units.
This holds those rules. Amounts go in and out as integers; formatting, parsing and validation know what each currency expects.
Features
- Format an integer amount for any of 136 currencies, with the right decimals
- Parse a typed amount back to minor units, whatever separators were used
- Check an amount is chargeable, and say why it is not
- Render a sale price with the old price struck through and a screen-reader label
- Work out a saving percentage, or apply a flat or percentage discount
- Split an amount between parts without losing a penny to rounding
- Describe a subscription interval — "/month", "every 3 weeks"
- Global helpers for the common cases:
format_money(),sanitize_money()
Installation
Quick start
Requirements
- PHP 8.3 or later
- WordPress 7.1 or later
License
GPL-2.0-or-later
All versions of wp-money with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.3
The package arraypress/wp-money contains the following files
Loading the files please wait ...