For local delivery we've added routenumbers and -locations to our users, so we can calculate the best route for local delivery. In Woocommerce and we're using Advanced Order Export Pro to create an export of the orders based on the shipping method.
By default the custom fields aren't coming back in the order details, so we're looking for a solution to add the routenumber and -locations to the order details based on e-mailaddress (or something).
Custom field on user-level should be added to order details
Does anyone know how we can fix this?
We've searched on the internet and thought we can fix this we a plugin like Checkout field editor, add those fields and make them invisible on the front-end. But I'm looking for some code to put in the functions.php.

Use the following, to add ACF User custom data to the order as custom order metadata:
Code goes in functions.php file of your child theme (or in a plugin). It should work.
The order custom meta_keys to be used in Advanced Order Export Pro are:
route_numberfor Routenumberroute_locationfor RoutelocatieTo get those custom field values from the order object use:
Related: ACF - How to Get Values From a User