diff --git a/plugin/buycourses/database.php b/plugin/buycourses/database.php index 057286d044..665ea8285a 100644 --- a/plugin/buycourses/database.php +++ b/plugin/buycourses/database.php @@ -718,6 +718,19 @@ $currencies = [ ]; foreach ($currencies as $currency) { + $value = Database::select( + "*", + $currencyTable, + [ + 'where' => ['country_code = ?' => $currency[0]], + ], + 'first' + ); + + if (!empty($value)) { + continue; + } + Database::insert( $currencyTable, [