Title: Import reviews programatically
Last modified: April 4, 2022

---

# Import reviews programatically

 *  Resolved [noplanman](https://wordpress.org/support/users/noplanman/)
 * (@noplanman)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/import-reviews-programatically/)
 * Hi,
 * We have a wealth of thousands of reviews and I’m working on a parser / importer
   for them all.
 * I’d love to take advantage of the “Fetch Book Cover” extension, but the functionality
   of importing the cover from a URL is fixed to the data coming via $_POST.
 * Is there any chance to make the `save_and_attach_cover_data` function statically
   available?
    Or how else would you recommend I go ahead with this?
 * Copy-pasting your code into my plugin would work too, but I’d prefer to re-use
   what comes baked in.
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [noplanman](https://wordpress.org/support/users/noplanman/)
 * (@noplanman)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/import-reviews-programatically/#post-15525553)
 * Quick update, which is working for me. Not sure how pretty this is though.
 *     ```
       $GLOBALS['review_id'] = $post_id;
   
       $_POST['rcno_reviews_gr_cover_url'] = get_post_meta( $post_id, 'rcno_reviews_book_cover_url', true );
       $_POST['rcno_book_title']           = get_post_meta( $post_id, 'rcno_book_title', true );
       $_POST['rcno_book_isbn']            = get_post_meta( $post_id, 'rcno_book_isbn', true );
   
       ( new Rcno_Fetch_Book_Cover() )->save_and_attach_cover_data();
       ```
   
 *  Plugin Author [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * (@w33zy)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/import-reviews-programatically/#post-15526457)
 * This is clever and it works (though I understand why you think it doesn’t look
   pretty)
 * Currently, I am rewriting the plugin to be more OOP-istic and I’ll look into 
   adding some more hooks to this feature so it is more easily extended.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Import reviews programatically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/recencio-book-reviews_486474.svg)
 * [Recencio Book Reviews](https://wordpress.org/plugins/recencio-book-reviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/recencio-book-reviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/recencio-book-reviews/)
 * [Active Topics](https://wordpress.org/support/plugin/recencio-book-reviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/recencio-book-reviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/recencio-book-reviews/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Kemory Grubb](https://wordpress.org/support/users/w33zy/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/import-reviews-programatically/#post-15526457)
 * Status: resolved