Sometimes autocorrect in an HTML form doesn't work, here is the solution with code to copy.
If you need to get or update the Sale & Regular price of a WooCommerce product from either the product ID or from the functions.php or plugin file, this is how to do it. Very easy!