Looking at the code, it appears to be OK. I added it to my site and I have a new currency choice on the Forms > Settings page under Default Currency. It’s at the end of the dropdown (it’s not alphabetized):
Really lost here.
First I tried that the functions.php file from my theme was buggy… but then I installed a plugin to add custom code snippets and I got this message when I try to save the snippet:
Fatal error on line 3 syntax error, unexpected variable “$currencies”
I also tried with PHP 7.4 on the server, got this message: syntax error, unexpected ‘$currencies’ (T_VARIABLE)
I think there is a problem with your code. Is there any other way to add a custom currency.