All woocommerce prices are presented as ,00.
Does anybody know the trick to change prices from ,00 into .- (only for prices ending with ,00)
See : https://www.celebrationevents.nl/licht-en-geluid-verhuur/geluidsinstallatie-huren/
Hey Gilbert,
Thank you for using Enfold.
Please add this code in the functions.php file:
add_action('wp_footer', 'ava_custom_script');
function ava_custom_script(){
?>
<script type="text/javascript">
(function($) {
function a() {
$('.woocommerce-Price-amount').text(function(i, text) {
return text.replace(',00', '.-');
});
}
a();
})(jQuery);
</script>
<?php
}
If the script is not working, please post the login details here so that we can check the site.
NOTE: We updated the code above.
Best regards,
Ismael
I tried the code but got an error massage :
Parse error: syntax error, unexpected ‘&’ in /home/vhosts/celebrationevents.nl/httpdocs/wp-content/themes/enfold/functions.php on line 567
I Hope you can fix it.