Allows to manipulate with currencies before showing their drop-downs on the front, example:
1 2 3 4 5 6 7 8 9 10 | add_filter('wpcs_currency_manipulation_before_show', function($currencies) { $any_conditions = true; if ($any_conditions) { unset($currencies['RUB']); unset($currencies['GBP']); } return $currencies; }); |
Structure of the data in variable $currencies in the example above is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | Array ( [USD] => Array ( [name] => USD [rate] => 1 [symbol] => $ [position] => left [is_etalon] => 1 [hide_cents] => 0 [description] => United States dollar [flag] => '' ) [GBP] => Array ( [name] => GBP [rate] => 0.80 [symbol] => £ [position] => left [is_etalon] => 0 [hide_cents] => 0 [description] => British pound [flag] => '' ) [UAH] => Array ( [name] => UAH [rate] => 26.069684 [symbol] => грн. [position] => left [is_etalon] => 0 [hide_cents] => 0 [description] => Украинская гривна [flag] => '' ) [RUB] => Array ( [name] => RUB [rate] => 62.218399 [symbol] => руб. [position] => left [is_etalon] => 0 [hide_cents] => 0 [description] => Российский рубль [flag] => '' ) ) |
from ver.2.1.2/1.1.2
