Prefix w/ underscore, or duplicate data in order meta
-
If I have a custom field, for instance a field for phone extension, and I don’t prefix the name with an underscore, then this plugin creates 2 postmeta rows, one for the name I set, and one with an underscore prefix.
So, if I created that field with name “billing_phone_ext”, then I end up with 2 postmeta rows, one with meta_key “billing_phone_ext“, and one with meta_key “_billing_phone_ext“.
Simply naming the field with the underscore prefix eliminates the problem, but we now must perform some DB maintenance and get rid of the extra rows. 1000s of rows.
The other part of this is that this creates a data integrity issue if I’m only expecting one of these fields in the database. I change one, yet the other stays with the original value.
Is there a way to have a name without underscore prefix and not have this issue?
- The topic ‘Prefix w/ underscore, or duplicate data in order meta’ is closed to new replies.