Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Add Currency Codes To MemberPress
This code snippet will add a custom currency to the MemberPress list of available currency codes.
The sample code will add the Egyptian Pound (EGP) to the currency list.
To add a different currency, replace EGP with the three-letter currency code of the needed currency, on this line:
array_push( $codes, 'EGP' );
In addition, to add multiple currencies, add all three-letter currency codes of the needed currencies, separating them with a comma. For example, to add both the Egyptian Pound (EGP) and the Indian Rupee (INR), the above-mentioned line of code would look like this:
array_push( $codes, 'EGP', 'INR' )
Code Preview
php
| |
| |
| |
| |
| |
| |
Comments