Try this snippet:
<?php
// WooCommerce - show cents within a sup tag
add_filter( 'wc_price', 'my_price', 3, 60 );
function my_price( $return, $price, $args ) {
// $return = price with currency symbol
// $price = price as a number
// $args = array (inc tax, exc tax)
$price = str_replace( ',', '', $price );
$dollars = intval( $price );
$cents = intval( ( $price - $dollars ) * 100 + 0.0001 ); // add a little bit for rounding errors
// ensure $cents has 2 characters
$cents_str = str_pad( $cents, 2, '0' );
return '$'.$dollars.'<sup>'.$cents_str.'</sup>';
}
The code goes in your child theme’s functions.php or you can use the “My Custom Functions” plugin.