I\'m trying to add custom fields to the WooCommerce checkout and there seems to be no output for hidden fields.
In woocommerce-template.php
, hidden fie
I know it's been awhile since you asked this question, but I found something that worked for me. I was able to get around a hidden field by posting certain information to the post meta.
This is what I did:
add_action( 'woocommerce_checkout_update_order_meta', 'your_hidden_data' );
function your_hidden_data( $order_id ) {
/*
Put your normal field saves here
*/
//Your hidden fields
update_post_meta( $order_id, 'YOUR DESIRED KEY NAME', 'YOUR DESIRED VALUE' );
}
Above where I have "YOUR DESIRED VALUE, I placed a function that returned a number that I needed saved to the order.
Hopefully this is not too specific to my own application.