# give/4.16.9/src/Framework/FieldsAPI/DonationForm.php

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

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/Framework/FieldsAPI/DonationForm.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/Framework/FieldsAPI/DonationForm.php
- Modified: 2023-10-16T17:55:46+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/Framework/FieldsAPI/DonationForm.php#L10-L20`.

```php
<?php

namespace Give\Framework\FieldsAPI;

use Give\Framework\FieldsAPI\Properties\DonationForm\CurrencySwitcherSetting;

/**
 * @since 3.0.0
 */
class DonationForm extends Form {
    /**
     * @since 3.0.0
     *
     * @var string
     */
    protected $defaultCurrency;

    /**
     * @since 3.0.0
     *
     * @var CurrencySwitcherSetting[]
     */
    protected $currencySwitcherSettings = [];

    /**
     * @since 3.0.0
     *
     * @var string
     */
    protected $currencySwitcherMessage;

    /**
     * @since 3.0.0
     */
    public function currencySwitcherSettings(CurrencySwitcherSetting ...$settings): DonationForm
    {
        $this->currencySwitcherSettings = $settings;

        return $this;
    }

    /**
     * @since 3.0.0
     */
    public function getCurrencySwitcherSettings(): array
    {
        return $this->currencySwitcherSettings;
    }

    /**
     * @since 3.0.0
     */
    public function currencySwitcherMessage(string $message): DonationForm
    {
        $this->currencySwitcherMessage = $message;

        return $this;
    }

    /**
     * @since 3.0.0
     */
    public function defaultCurrency(string $currency): DonationForm
    {
        $this->defaultCurrency = $currency;

        return $this;
    }

    /**
     * @since 3.0.0
     */
    public function getDefaultCurrency(): string
    {
        return $this->defaultCurrency;
    }
}
```
