Last active
June 15, 2018 19:17
-
-
Save cliffordp/9ce9bcae4d3a08453b9062aeef12e3a8 to your computer and use it in GitHub Desktop.
Replace period with comma before decimals in Event Cost. So display http://cl.ly/273M0h1W2T3W instead of http://cl.ly/2h1n380U2L0h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Replace period with comma before decimals in Event Cost. | |
* Displays http://cl.ly/273M0h1W2T3W instead of http://cl.ly/2h1n380U2L0h | |
* | |
* @link https://gist.github.com/cliffordp/9ce9bcae4d3a08453b9062aeef12e3a8 By Barry. | |
* @see tribe_get_cost() | |
*/ | |
add_filter( 'tribe_get_cost', 'cliff_change_currency_formatting', 500 ); | |
function cliff_change_currency_formatting( $cost ) { | |
return str_replace( '.', ',', $cost ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment