Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('cred_submit_complete', 'expiration_update',10,2);
- function expiration_update($post_id, $form_data)
- {
- // if a specific form
- if ($form_data['id']==19)
- {
- $new_date = get_post_meta($post_id, 'wpcf-date-of-home-purchase', true);
- //We update the _cred_post_expiration_time Field in the Database with this new value
- update_post_meta($post_id, '_cred_post_expiration_time', $new_date);
- }
- }
Add Comment
Please, Sign In to add comment