Check out example codes for "include in the price html woocommerce". It will help you in understanding the concepts better.

Code Example 1

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 );
}

Learn ReactJs, React Native from akashmittal.com