aggregator
aggregator copied to clipboard
Post Meta not Updating
Post meta is not currently updating due to an incorrect post ID assignment when a target post already exists. Starting on line 866, you'll see that the $target_post_id
is being overridden instead of being assigned to the old post data being carried through.
This means that when updating a post (new posts work fine) the child post never receives the updated fields.
These variables should be switched.
if ( false !== $portal_target_post_id ) {
$target_post_id = $orig_post_data['ID'];
wp_update_post( $orig_post_data );
}