Title: Custom Meta Fields
Last modified: December 11, 2020

---

# Custom Meta Fields

 *  Resolved [webgardengeek](https://wordpress.org/support/users/webgardengeek/)
 * (@webgardengeek)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-meta-fields-4/)
 * Ok…
 * I used WCK Pro to create a post type ‘distributors’. Then to create a custom 
   metabox that’s a repeater with metadata id ‘orderdetails’. It has 3 fields and
   as many rows as you want.
 * If I enter data into the repeater via the edit post screen, it enters just fine
   and you can see the data in the template on the front end.
 * There is also a way for distributors (as a user type) can log in and from the
   front end submit an order using a custom form. That custom form, upon submit 
   sends a couple of emails, builds the form fields into an array and then uses 
   update_post_meta to upload that array to the meta box (e.g. update_post_meta(
   get_the_ID(),’orderdetails’,$orderArray); )
 * This works just fine as long as NO data was ever entered through the back end
   system (e.g. the WCK interface on the post edit screen). However, if data was
   ever entered via the WCK interface on the post edit screen, programmatic updates
   to post meta stop working — and delete_post_meta also does not work for some 
   reason, so it’s not like I can simply delete whatever’s there and replace it 
   with the array that’s built in the template once the form is submitted.
 * I get this is a nuanced issue, but hoping maybe someone else has run into this
   problem and found a solution.

Viewing 1 replies (of 1 total)

 *  [dariusraia](https://wordpress.org/support/users/dariusraia/)
 * (@dariusraia)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/custom-meta-fields-4/#post-13792077)
 * Hello [@webgardengeek](https://wordpress.org/support/users/webgardengeek/),
 * Thank you for reaching out to us.
 * That doesn’t work due to how WCK stores data. Basically, in the backend you manage
   a serialized array that after that same it then saves information in non-serialized
   post meta, with what you’re working with. So if you modify just the non-serialized
   post meta, WCK doesn’t take those changes into account. Basically it’s double
   saving the information. It’s bad from a programming p.o.v. but it’s due to the
   fact that adding support for non-serialized post meta was more important then
   this inconsistency.
    You can still make changes as long as you make them in both
   the serialized and non-serialized post meta.
 * Kind regards,

Viewing 1 replies (of 1 total)

The topic ‘Custom Meta Fields’ is closed to new replies.

 * ![](https://ps.w.org/wck-custom-fields-and-custom-post-types-creator/assets/icon-
   256x256.png?rev=2257602)
 * [Custom Post Types and Custom Fields creator - WCK](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/)
 * [Active Topics](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wck-custom-fields-and-custom-post-types-creator/reviews/)

## Tags

 * [delete_post_meta](https://wordpress.org/support/topic-tag/delete_post_meta/)
 * [meta boxes](https://wordpress.org/support/topic-tag/meta-boxes/)
 * [repeater](https://wordpress.org/support/topic-tag/repeater/)
 * [update_post_meta](https://wordpress.org/support/topic-tag/update_post_meta/)
 * [WCK](https://wordpress.org/support/topic-tag/wck/)

 * 1 reply
 * 2 participants
 * Last reply from: [dariusraia](https://wordpress.org/support/users/dariusraia/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/custom-meta-fields-4/#post-13792077)
 * Status: resolved