<?php
|
namespace JVBase\managers\SEO\render\Traits\_Properties;
|
|
use JVBase\managers\SEO\render\Traits\_Helpers\arrayHelper;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
trait currenciesAcceptedTrait {
|
use arrayHelper;
|
/**
|
* @var string|array The currency accepted.
|
*
|
* Use standard formats: ISO 4217 currency format, e.g. "USD"; Ticker symbol for cryptocurrencies, e.g. "BTC"; well known names for Local Exchange Trading Systems (LETS) and other currency types, e.g. "Ithaca HOUR".
|
*/
|
protected string|array $currenciesAccepted;
|
|
public function getCurrenciesAccepted():string|array|null
|
{
|
return $this->currenciesAccepted??null;
|
}
|
public function setCurrenciesAccepted(string|array $currenciesAccepted):void
|
{
|
if (is_array($currenciesAccepted)) {
|
$currenciesAccepted = $this->stringArray('currenciesAccepted', $currenciesAccepted);
|
}
|
$this->currenciesAccepted = $currenciesAccepted;
|
}
|
|
public function getCurrenciesAcceptedFieldConfig():array
|
{
|
return [
|
'type' => 'text',
|
'label' => 'Currencies Accepted',
|
'hint' => 'A comma separated list of currencies (ex: CAD, USD)',
|
'default' => 'CAD'
|
];
|
}
|
}
|