# give/4.16.9/src/FormMigration/Steps/CurrencySwitcher.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 43 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/FormMigration/Steps/CurrencySwitcher.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/FormMigration/Steps/CurrencySwitcher.php
- Modified: 2024-06-26T16:32:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/FormMigration/Steps/CurrencySwitcher.php#L10-L20`.

```php
<?php

namespace Give\FormMigration\Steps;

use Give\FormMigration\Contracts\FormMigrationStep;

/**
 * @since 3.13.0
 */
class CurrencySwitcher extends FormMigrationStep
{
    /**
     * @since 3.13.0
     */
    public function process()
    {
        $status = $this->formV2->getCurrencySwitcherStatus();
        if (!$status) {
            return;
        }

        $currencySwitcherSettings = [];
        $currencySwitcherSettings['enable'] = $status;

        $message = $this->formV2->getCurrencySwitcherMessage();
        if ($message) {
            $currencySwitcherSettings['message'] = $message;
        }

        $defaultCurrency = $this->formV2->getCurrencySwitcherDefaultCurrency();
        if ($defaultCurrency) {
            $currencySwitcherSettings['defaultCurrency'] = $defaultCurrency;
        }

        $supportedCurrencies = $this->formV2->getCurrencySwitcherSupportedCurrencies();
        if ($supportedCurrencies) {
            $currencySwitcherSettings['supportedCurrencies'] = $supportedCurrencies;
        }

        $this->formV3->settings->currencySwitcherSettings = $currencySwitcherSettings;
    }
}

```
