Sync payment currencies with project config #2390
Unanswered
joshuabaker
asked this question in
Ideas
Replies: 1 comment
-
Not fond of this workaround. // Ensure that the payment currency is GBP
Event::on(
Application::class,
Application::EVENT_INIT,
static function () {
$paymentCurrencies = Commerce::getInstance()->getPaymentCurrencies();
$primaryPaymentCurrency = $paymentCurrencies->getPrimaryPaymentCurrency();
if ($primaryPaymentCurrency->iso !== 'GBP') {
$primaryPaymentCurrency->iso = 'GBP';
$paymentCurrencies->savePaymentCurrency($primaryPaymentCurrency);
}
}
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions