Voeg deze code toe in de functions.php van je thema of in Code Snippets.


/**
* Change decimals 00 to ,-
**/
add_filter( 'formatted_woocommerce_price', 'hh_woo_decimal_price', 10, 5 );
function hh_woo_decimal_price( $formatted_price, $price, $decimal_places, $decimal_separator, $thousand_separator ) {
$unit = number_format( intval( $price ), 0, $decimal_separator, $thousand_separator );
$decimal = sprintf( '%02d', ( $price - intval( $price ) ) * 100 );
if ($decimal == 0) {
return $unit . ',-';
} else {
return $formatted_price;
}
}