I want to change the value of "sale price" of the products so that I do not get an error when I put it higher than the "Regular price", how could I do this? Using PHP in the woocommerce code or installing a plugin?
I've been looking at the plugin code and this is what I have in function.php:
function bd_rrp_sale_price_html( $price, $product ) {
if ( $product->is_on_sale() ) :
$has_sale_text = array(
'<del>' => '<del><span class="arprice">MSRP:</span>',
'<ins>' => '<ins><span class="arprice"> Our Price : </span>'
);
$return_string .= str_replace(array_keys( $has_sale_text ), array_values( $has_sale_text ), $price);
else :
$retun_string = $price;
endif;
$return_string.='<span class="arprice hh">PRE-OWNED : Call For Quote </span>';
return $return_string;
}
add_filter( 'woocommerce_get_price_html', 'bd_rrp_sale_price_html', 100, 2 );
I'm also looking at the woocommerce plugin code to find the variable from there.