Title: Compability update for wp-types
Last modified: August 21, 2016

---

# Compability update for wp-types

 *  Resolved [Ismo Vuorinen](https://wordpress.org/support/users/ivuorinen/)
 * (@ivuorinen)
 * [12 years ago](https://wordpress.org/support/topic/compability-update-for-wp-types/)
 * Hi and thank you for the great plugin!
    It works like a dream, if you’re not 
   one of the unfortunate depending on WP-Types (v.1.5.6) plugin.
 * I battled for few hours to get the update mechanism to keep meta data intact.
 * Here’s what I found out:
    1. WP-Types uses save_post[1] to save meta fields, making the priority 100 solves
       this problem. After research couldn’t find negative effect.
    2. update_post() forgets post meta for some strange reason
 * My solution/changes:
 * line #45
    `add_action( 'save_post', array( $this, 'scadenza_save_postdata' ),
   100 );`
 * and on line #127 (Answer found from stackoverflow[2])
    `$wpdb->update( $wpdb-
   >posts, array( 'post_status' => 'expiration' ), array( 'ID' => $cur_post->post_id));`
 * These two small changes made the plugin work for me as expected.
 * [1] [http://wp-types.com/forums/topic/update_post_meta-does-not-work-for-custom-fields/](http://wp-types.com/forums/topic/update_post_meta-does-not-work-for-custom-fields/)
   [
   2] [http://stackoverflow.com/questions/5573230/wp-update-post-make-custom-field-values-disappear-wordpress](http://stackoverflow.com/questions/5573230/wp-update-post-make-custom-field-values-disappear-wordpress)
 * [https://wordpress.org/plugins/va-simple-expires/](https://wordpress.org/plugins/va-simple-expires/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [kuck1u](https://wordpress.org/support/users/kuck1u/)
 * (@kuck1u)
 * [12 years ago](https://wordpress.org/support/topic/compability-update-for-wp-types/#post-4955523)
 * Hi and thank you for the report of bug.
 * Made modifications.
    I’m sorry I’m so late.

Viewing 1 replies (of 1 total)

The topic ‘Compability update for wp-types’ is closed to new replies.

 * ![](https://ps.w.org/va-simple-expires/assets/icon-256x256.png?rev=974906)
 * [VA Simple Expires](https://wordpress.org/plugins/va-simple-expires/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/va-simple-expires/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/va-simple-expires/)
 * [Active Topics](https://wordpress.org/support/plugin/va-simple-expires/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/va-simple-expires/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/va-simple-expires/reviews/)

## Tags

 * [meta-data](https://wordpress.org/support/topic-tag/meta-data/)
 * [update_post](https://wordpress.org/support/topic-tag/update_post/)
 * [wp-types](https://wordpress.org/support/topic-tag/wp-types/)

 * 1 reply
 * 2 participants
 * Last reply from: [kuck1u](https://wordpress.org/support/users/kuck1u/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/compability-update-for-wp-types/#post-4955523)
 * Status: resolved