Account page fetching duplicate field IDs
-
Hi,
I tried creating fields with the same meta name as the woocommerce ones (e.g. billing_phone, billing_postcode) on the new registration form. That part works good. I submit the form, approve the user but the problem arises once that user logs in gets to his /account/ page as the woo fields (the ones created in the form) are showing twice now.
For example:
Billing phone shows on the billing tab by default but now there is an additional field called “Billing Phone” with the same value and ID on that same billing tab. This goes the same for all the other fields i marked with the same meta_name as the woocommerce one. I guess plugin loads, both, the fields from the registration form and woo even thought the meta_name is the same.Now I found a solution that I’m not sure if it will work correctly so I wanted to ask you by presenting it here.
For each field named after the same woocommerce meta name I set the privacy to be Specific user role -> Administrator. That way any customer that logs in and goes to his account page won’t be able to see that um-field but will still see regular billing fields from woocommerce. Can you tell me if there is a better solution for my problem or should I stick with this one?
- The topic ‘Account page fetching duplicate field IDs’ is closed to new replies.