I want to update a post using
wp_update_post( $my_post );
How can I check if it was successful? Should it return the post ID on successful update?
I’m trying this:
$post_id = wp_update_post( $my_post );
if ( $post_id ) {
echo "successful";
} else {
echo "fail";
}
The above code does not return any ID, so i wanted to make sure if it is correct.