Product Custom Fields with HTML and JS
I have a custom textarea filed for the product page.
woocommerce_wp_textarea_input( array( 'id' => '_custom_product_calc', 'label' => __('Test', 'woocommerce') ) ); $woocommerce_custom_product_calc = $_POST['_custom_product_calc']; if (!empty($woocommerce_custom_product_calc)) update_post_meta($post_id, '_custom_product_calc', esc_html($woocommerce_custom_product_calc));
I need to use this field for insert some HTML code with JS. But, as you can see, the result is not what I’ve expected.
How can I change this? Or, maybe you know a better way to add a tab with HTML and JS for a product page? Clone Short description, for example?