You should never edit core and plugin files directly because any updates will overwrite your changes. If you see the WooCommerce source at the get_price_html
method, there are many filters available to modify the output of the function.
From get_price_html
in class-wc-product:
return apply_filters('woocommerce_get_price_html', $price, $this);
So to add your own filter:
add_filter( 'woocommerce_get_price_html', 'wpa83367_price_html', 100, 2 );
function wpa83367_price_html( $price, $product ){
return 'Was:' . str_replace( '<ins>', ' Now:<ins>', $price );
}