Posted: July 28, 2015 at 7:52 am
|
How can I remove the currency symbol from the Add Event and Registration page . Because we have different currencies for our events . I have the Topic 1 year ago but had the last update , the currencies are back. thanks Sergio Pannella |
Hi Sergio, Can you link us to one of you event so we can see where the currency symbol is displayed please? In your previous thread Josh provided a function to remove the currency which could be placed within a Site Specific Plugin, is that still in use? |
|
|
Hello Tony |
|
…1 year ago I found the solution in “organization_config.php” |
Hi Sergio, we don’t recommend editing the core plugin so we would like to explore if there is another way to handle this. Where specifically on the page are you wanting to remove the currency symbol? Is it in the pricing dropdown menu where two are shown there? — |
|
|
Hallo Lorenzo, because we have different events in three countries . should the default currency symbol “US Dollars” disappear. by event display and event registration. |
Hi Sergio, The reason the currency came back after the update is because you hacked a core file. When you hack a core file, your changes will get overwritten on an update. Instead of hacking the core files, you can add a little function to a custom snippets plugin function my_change_ee_currency( $content ) { $content = str_replace( '$', '', $content); return $content; } add_filter( 'the_content', 'my_change_ee_currency', 11 ); |
|
|
Hi Josh, thanks for your help , I installed the custom snippets plugin , but does not work Link to the event:http://www.pov-int.eu/termine/?ee=894 /* Stop Adding Functions */ function my_change_ee_currency( $content ) { $content = str_replace( ‘$’, ”, $content); return $content; } add_filter( ‘the_content’, ‘my_change_ee_currency’, 11 ); |
|
… and I have tried again,after the update, with the solution “organization_config.php/ |
|
Try this
It changes the Currency code in the options if the code is not set to blank. Please note, this fires on EVERY admin page! You need to either tweak the code to make it not do that or only activate this code when you need it (e.g. if you update your Organization settings, it will revert to a currency. |
|
I forgot to write this small detail (?>) in the code. WordPress could not activate plugin. But now works . |
|
Glad you got it sorted! |
|
Sorry Dean , but is now another problem : |
Hi Sergio, Your now likely getting that error because you have whitespace after the closing PHP tag you added above. You don’t really want to close the PHP tags as it is really easy to cause this issue if you do. Check for whitespace after the closing tag (spaces, return lines, anything), you’ll need to remove anything after it. I would also recommend removing the closing PHP tag from the end of the file, it should not be needed. |
|
|
Thanks again! finally it is working! |
Great! I’m glad its working for you. As Dean mentioned if you are using that code within a Site Specific Plugin you would be best de-activating the plugin so it does not run on every page, it only needs to be activated once (then de-activated again) if you edit Event Espresso -> General Settings. |
|
|
I have made. |
You’re welcome 🙂 I’ll mark this thread resolved, have a great day. |
|
The support post ‘remove the currency symbol’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.