Content of the page

$WPCS->get_welcome_currency()

This function created to define what currency is “welcome” in WPCS settings.

Welcome currency is currency which will be set for the first visit of any unique visitor.  

$WPCS->current_currency

This is not a function – this is an important variable in the plugin main class WPCS, and its always equal to the current selected currency which actual on the front of the site

 

$WPCS->default_currency

This is not a function – this is an important variable in the plugin main class WPCS, and its always equal to default currency which is predefined in the plugin settings.

$WPCS->reset_currency()

This function reset current selected currency to default currency

You can use it by your own logic for any customization …  

$WPCS->get_currencies()

This function returns an array of all currencies defined on the plugin settings page.

Use this function to get any information about any currency in the plugin system. Data returns as shown in the next example:

   

$WPCS->back_converts()

Useful function when you want to convert any amount in non-basic currency into basic currency amount. For example you have 40GBP. Basic currency of your shop is EUR, to convert that 40GBP into XX EUR you are need do next:

40 – amount in GBP 0.8343 – rate of 1 GBP relatively to 1… read more

$WPCS->storage->set_val()

This function works with WPCS storage where keeps different values, current currency for example.

Possible keys: wpcs_current_currency – here keeps selected on the front current currency code You can use this function to keep any your own intermediate values by your own logic to use them for example in the code of any another plugin or… read more

$WPCS->storage->get_val()

This function can return any WPCS storage value, current currency for example.

All values which can be get by this function installed in the WPCS storage by the next function: $WPCS->storage->set_val().