Add a custom currency in WP Events Manager

To add a custom currency in WP Events Manager, you should create child theme because this code is not affected by updates if using a child theme.

Then copy the code below  and paste it in  functions.php file (child theme) and swap out the currency code, currency name and symbol with your own (http://prntscr.com/lng7ta).

function thim_custom_curency($currencies){
$currencies['Code'] = 'Currency name';

return $currencies;
}

add_filter( 'wpems_currencies', 'thim_custom_curency' );

function thim_new_event_currency_symbol( $currency_symbol, $currency ) {
if ( $currency == 'Code' ) {
$currency_symbol = 'Symbol';
}
return $currency_symbol;
}

add_filter( 'tp_event_currency_symbol', 'thim_new_event_currency_symbol', 10, 2 );

After saving changes, it should be available from your Events manager / Settings / General / Currency (http://prntscr.com/lilzxt)

Example: If you want to add Sri Lankan Rupees currency with Code: LKR and Symbol: RS

You have to create child theme then add the code  below to functions.php file (child theme)

function thim_custom_curency($currencies){
$currencies['LKR'] = 'Sri Lankan Rupees - Rs';

return $currencies;
}

add_filter( 'wpems_currencies', 'thim_custom_curency' );

function thim_new_event_currency_symbol( $currency_symbol, $currency ) {
if ( $currency == 'LKR' ) {
$currency_symbol = 'Rs';
}
return $currency_symbol;
}

add_filter( 'tp_event_currency_symbol', 'thim_new_event_currency_symbol', 10, 2 );

 

Best Deals
Get Eduma Now

For Only *
$439 $69

 
GRAB THE DEAL
* Hurry up! Offer ends this Friday!
close-link
ấdsa
ádasd
ádsad
Subscribe
Give it a try, you can unsubscribe anytime.
close-link
20% OFF all LearnPress premium add-ons

GET 20% OFF COUPON NOW
Your information will never be shared
close-link
Download
LEARNPRESS
WordPress LMS
Download the best WordPress LMS now. Completely Free.
close-link
Learn More