I really would like to buy the premium package, but I’d like to have this fixed first…
Maybe something relative… I functions.php I found:
//Change price html
function road_woo_price_html( $price, $product ){
if($product->product_type=="variable") {
if($product->get_variation_sale_price() && $product->get_variation_regular_price()!=$product->get_variation_sale_price()){
$rprice = $product->get_variation_regular_price();
$sprice = $product->get_variation_sale_price();
return '<span class="special-price">'.( ( is_numeric( $sprice ) ) ? woocommerce_price( $sprice ) : $sprice ) .'</span><span class="old-price">'. ( ( is_numeric( $rprice ) ) ? woocommerce_price( $rprice ) : $rprice ) .'</span>';
} else {
$rprice = $product->get_variation_regular_price();
return '<span class="special-price">' . ( ( is_numeric( $rprice ) ) ? woocommerce_price( $rprice ) : $rprice ) . '</span>';
}
}
if ( $product->price > 0 ) {
if ( $product->price && isset( $product->regular_price ) && ( $product->price!=$product->regular_price )) {
$rprice = $product->regular_price;
$sprice = $product->price;
return '<span class="special-price">'.( ( is_numeric( $sprice ) ) ? woocommerce_price( $sprice ) : $sprice ) .'</span><span class="old-price">'. ( ( is_numeric( $rprice ) ) ? woocommerce_price( $rprice ) : $rprice ) .'</span>';
} else {
$sprice = $product->price;
return '<span class="special-price">' . ( ( is_numeric( $sprice ) ) ? woocommerce_price( $sprice ) : $sprice ) . '</span>';
}
} else {
return '<span class="special-price">0</span>';
}
}
add_filter( 'woocommerce_get_price_html', 'road_woo_price_html', 100, 2 );
Is this something why it doesn’t work?