I’ve developed plugin which can edit custom posts( from TablePress ) in Frontend. The problem is that when I edit them in backend, everything works fine, and even unlogged users can see changes. But when I edit it from frontend with my plugin, only admin can see changes…
I’m not sure if this problem is with revisions? Plugin works for most users, but not for one, and I have no idea why…
Code:
$my_post = array(
'post_status' => 'publish',
'post_type' => 'tablepress_table',
'ID'=> $post_id,
'post_content' => wp_slash( json_encode( $postJsonArray) ),
'post_title' => $post->post_title
);
wp_update_post( $my_post );