Compatible with CFF: Free Professional Developer Platinum
The "CFF Currency Exchange" plugin adds an operations collection to the Calculated Fields Form to get exchange rates from external APIs.
The "CFF Currency Exchange" plugin adds an operations collection to the Calculated Fields Form to get exchange rates from external APIs.
The "Calculated Fields Form" plugin includes many operations for multi-purpose projects like mathematical operations, date/time operations, financial operations, drawing charts, and more. The "CFF Currency Exchange" plugin includes new operations collections to get exchange rates from external APIs.
The current version of the plugin implements the integration with the following APIs and services: Fixer.io, Free Currency Converter, and Open Exchange Rates.
After installing and configure the plugin would be available new operations to be used with the calculated fields' equations:
Assuming the fieldname1 field in the form contains the price in Euros, and you want to get the equivalent price in United States Dollars, using the Fixer.io integration, the equation would be implemented as follows:
fieldname1*CFF_FIXERIO("EUR", "USD")
The installation process of the "CFF Currency Exchange" plugin is similar to other plugins in WordPress. Download the zip file with the plugin's code to your computer (visiting the download link provided after purchasing), and follow the steps below:
The plugin includes the menu option "Calculate Fields Form > Currency Exchange"
The new page allows you to register your copy of the plugin to receive the updates directly on your WordPress, instead of download and install them manually. Furthermore, it includes multiple sections to enable integration with different APIs. Finally, through the plugin's page, it is possible to deactivate it completely, deleting its data.
To register the plugin, you should go to the menu option "Calculate Fields Form > Currency Exchange" enter the email address used to purchase the plugin, and press the "Register" button.
The settings page of the plugin includes three sections for enabling and configure the three supported APIs.
Fixer.io section includes a checkbox for enabling the integration with the Fixer.io API, an input box for entering the API Key. The API Key should be copied from Fixer.io. Furthermore, this section includes an attribute for backing up exchange rates locally on the website instead of querying the external API with every request. Most exchange rates services limit the number of requests, and the backup attribute reduces the number of requests to the API. The API must be enabled for using the CFF_FIXERIO operation from the forms.
Free Currency Converter section. includes a checkbox for enabling the integration with the Free Currency Converter API, an input box for entering the API Key, and a select box to configure the exchange rates backup intervals. The API must be enabled to use the CFF_FREE_CURRENCY_CONVERTER operation.
Open Exchange Rates section. Similar to the previous sections, it includes a checkbox for enabling the integration with the Open Exchange Rates API, an input box for entering the Application Id, and a select box to configure the exchange rates backup intervals. The API must be enabled for using the CFF_OPEN_EXCHANGE_RATES operation.
To use the new operations with the projects, based on the APIs enabled would be available three operations: CFF_FIXERIO, CFF_FREE_CURRENCY_CONVERTER, and CFF_OPEN_EXCHANGE_RATES. These operations can be used in the equations associated with the calculated fields. All of them require two parameters for the currency codes, represented by three letters (Ex. EUR for Euro). For example, to get the exchange rate from United States Dollars to Euro, calling the Free Currency Converter API, would be used the operation:
CFF_FREE_CURRENCY_CONVERTER("USD", "EUR")