I need this very urgently to add an custom text field on the single product page just above the add to cart where customers will add special instruction during add to cart. plz let me know how to use this code. Thanks !

In the current version of WooCommerce, the relevant file to update with this hack is "woocommerce/templates/single-product/add-to-cart/variable.php" (which you can copy under your own theme at "{your_theme}/woocommerce/single-product/add-to-cart/variable.php" in order to override it without the risk of a WooCommerce update blowing away your changes.

Hi, I'm searching a way to add 2 number input fields in WooC. , validate price based on both values from inputs, and save values on order pages, I've aadded fields to single-product, but i can't set price and save those numbers, can you,please, help me/look at my code?