Hi @tantienhime,
Sorry for the late reply.
Unless I’m missing something, I still think that you can achieve what you need by enabling our “User profile” checkbox. The field will be added to the checkout, and when a user makes an order and fills in this field, the field’s value will also be saved/updated in the user profile as well.
Let’s say you add a custom checkout field with our plugin. If you add it to the Billing section, then the field’s ID will be _billing_alg_wc_checkout_field_1
, i.e. you can get it from the order with:
get_post_meta( $order_id, '_billing_alg_wc_checkout_field_1', true );
Now if you’ve enabled our “User profile” checkbox, then this field will also be saved in the user meta as well. And every time user makes a new order, the field value will be overwritten in case if the user fills it in with a new value. The key in user meta is almost identical to the order meta, except the leading underscore symbol, i.e. billing_alg_wc_checkout_field_1
, so you can get it (and use it in your reports) from the user meta with:
get_user_meta( $user_id, 'billing_alg_wc_checkout_field_1', true );
Please let me know what you think.