I solved my own problem.
save-post hooks in before the form is saved. It even gives us access to the $_POST object and allows us to interact with it before the original save happens.
What this means essentially is that I’m overwriting my values with blank formdata.
Rather than updating post meta, I’ve documented and am writing to the $_POST object the updated values, which are then submitted as part of the original save post.
$hat = update_post_meta( $post_id, 'field_name', $update_var );
Becomes
/**document this well or you'll drive someone insane in the future.**/
$_POST['field_name'] = $update_var;
Thanks everyone for your thoughts and attempts to help. You no doubt inspired me to think about it.
Related Posts:
- what is correct way to hook when update post
- How to make a image-size selected by default in Media upload – WP v3.5
- Apply class to every paragraph that holds image?
- Remove “Insert from URL” link in Media upload – WP 3.5
- static variable loop not working in WordPress
- How to change the wp-login.php page title?
- adding a filter to a shortcode?
- Hide custom image sizes from media library
- Set media upload attachment link to none and hide it in WP v3.5
- How to set custom cookies before output
- Permanently remove first image from posts
- Change the footer text on the login page
- How can I hook into and edit the text of a wp_nav_menu tag?
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Why is my custom meta box input not saving
- add_filter to post-gallery and remove all ‘s?
- Rename image uploads with width in filename
- Action ‘save_post’ not working for quick edit
- How to make an meta_query optional?
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Check if page parent has certain template
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- Change comments form title on a page by page basis
- Filter the blog title displayed in the header
- How can i create a function to get youtube video time
- Display only text to WordPress loop without loosing the text formatting
- Remove class that has been added by parent theme
- Second select list values are not saved after clicking update
- Update Custom Field on Imported Post Creation
- append PHP function to the_content
- Set Primary category using the Yoast SEO plugin
- “Maximum function nesting level of ‘100’ reached” after adding a new filter
- How do I know what variables are passed in a filter/action and what their meaning is?
- Find variables available at a given hook
- wp_get_attachment_url filter won’t accept two arguments
- body_class filter – Is there a better way to write this code?
- Why do filters/actions require an argument count?
- Redirecting the lost password page request when using a custon login page
- How to display custom seo title before the loop?
- How can i style “echo apply_filters”
- Adding body class to html tag that already has language attrubutes?
- Custom Bulk Actions handler not firing
- How to generate customized filtered output for the gallery
- dynamically change content of div with php
- Add class to all meta boxes for a custom post type
- Add a leading zero to pagination
- How to remove title tag with this filter
- str_replace not preserving whitespace
- How to apply filter
- Custom theme: adding unwanted tags in the content
- Apply filters when loading post via ajax
- Add custom filter to register data in array
- Get terms of the posts with one query
- Woocommerce Price Text
- Limit Taxonomy Parents
- Display a post based on its metabox selection
- Save data of select list after clicking save
- Select All not working in a WordPress search filter
- Custom field in title
- WordPress – show all posts + ones with specific tag
- Search box background on a different page template
- dynamically filter by category via sub-menu
- Display a list of users with avatar filterable with alphabets
- WXR XML import is stripping php tags that I need to keep
- How to extend the page editor?
- How to add custom checkout field in user details mail template
- Keeping the previous get value and add another value when submitted
- AJAX: WordPress filters inside $html do not work as intended
- Why not showing all post by default in my jquery filter
- For each loop will not append to the_content hook
- Assign new post author IF another user in custom field on post transition
- Blog Posts not sorted and pagination not adjusted after filtering some category
- Modify meta data before saving to database
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- How to change wp-admin and wp-login urls
- How to add different menu items on different menus?
- How to pass value to add_filter wpcf7_form_tag from another function?
- Save_Post change Custom Post Type Post title to post id number
- Custom Filtering date with newsletter
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?
- How rename wp-content and wp-admin folders correctly
- Unable to logout correctly after wp-login file was modified
- how to append ACF field data using one of the following filter/ hooks
- Changing upload directory temporarily
- Add an attribute on WP images attachment link
- Show post in elementor based on views and specific category with query id feature in elementor
- Display featured posts first, then display all others within a specific category in WordPress
- Edit password change email text or disable it
- Adding Author Filter to CPTs
- How can I display formatted content using the_content filter?
- Using send_password_email filter after wp_update_user
- Why does my custom slug only show in Gutenberg editor after page refresh?
- Prevent publishing of uncategorized posts
- WordPress query_posts with multiple tax_query
- Ajax Filters with Multiple tax_query args
- How do I ensure that the URL parameters are updated correctly when multiple filters are applied
- Filtered queries not responeding to page path