Bug: wp_update_post can trigger save of meta value to wrong post

I encountered the following: If I am using the same metabox.io meta field id on post type a and b, as well as using rwmb_after_save_field on post type a (checks post type to make sure it is post type a) to trigger wp_update_post for post type b, will cause metabox.io to also save the meta fields from post type a on post type b (at least if the field ids overlap).

Looks like you might have to unhook the metabox.io’s save feature for the rwmb_after_save_field action.

I might be wrong, but this seemed to be happening to me until I manually updated the database instead of using wp_update_post.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer