I added fields to the WooCommerce Checkout field; Some with a plugin ( WooCommerce Checkout Field Editor and WooCommerce Checkout Add-Ons ) and others with a function.
I can export these fields to CSV, but How can I edit them in the order admin page? Sometimes I a user might forget to add their ClientCode or ID Number, and then I want to be able to manually add it.
Thank you Schalk
If you want to add existing custom checkout billing and shipping fields to the editable order shipping and billing sections in edit order pages, you will use one or both of the following filter hooks:
woocommerce_admin_billing_fields
,woocommerce_admin_shipping_fields
.Example usage and related answers:
Those fields values will be automatically saved when edited/changed.
For others very custom checkout fields you can add them out of the editable boxes at the bottom of each section using one of those actions hooks:
woocommerce_admin_order_data_after_order_details
woocommerce_admin_order_data_after_billing_address
woocommerce_admin_order_data_after_shipping_address
Then you will have to add similar editable fields, with the same keys (name attribute) and use
save_post_shop_order
action hook…