When I run pagespeed insight, this <span class="woocommerce-Price-currencySymbol">cause Excessive Dom Elements. I tried the following methods but to no avail. Many have encountered these issue but no one has a solution.
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'AUD': $currency_symbol = 'AUD'; break;
}
return $currency_symbol;
}
include_once __DIR__ . '/theme-includes/theme-functions.php';
And this
add_filter( 'formatted_woocommerce_price', 'span_custom_prc', 10, 5 );
function span_custom_prc( $number_format, $price, $decimals, $decimal_separator, $thousand_separator)
{
return "<span class='woocommerce-Price-amount amount'>".$number_format." </span>";
}