I'm making a plugin that uses
wp_update_post() to create and edit posts, but I'm not clear on how to set an thumbnail image in my code.
I'm looking for something like
wp_set_post_thumbnail_image($post_ID, $attachment_ID) but of course, that's not quite right.
Does anyone know how I can do this?