# Wordpress Post Sync - import not working

**URL:** <https://www.patreondevelopers.com/t/wordpress-post-sync-import-not-working/3327>\
**Category:** Wordpress Plugin\
**Created:** [June 22, 2020, 12:25am UTC](https://www.patreondevelopers.com/t/wordpress-post-sync-import-not-working/3327 "2020-06-22T00:25:54Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Nawiel\_Almyugar](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@Nawiel\_Almyugar](https://www.patreondevelopers.com/u/Nawiel_Almyugar)\
**Post date:** [June 22, 2020, 6:53pm UTC](https://www.patreondevelopers.com/t/wordpress-post-sync-import-not-working/3327/8 "2020-06-22T18:53:11Z")

</div>

After digging through the Patreon Wordpress (patreon-connect) plugin code, I’ve found the method `Patreon_Content_Sync::check_replace_patreon_images_with_local_images` must be always called with 3 parameters, but the third parameter `$post_id` is missing when being called in `Patreon_Content_Sync::add_new_patreon_post` method, throwing the fatal error and interrupting the post import. This only happens if there are some images in the post content.

For the record, I’ve been developing a quick fix by doing the following in the `patreon-connect/classes/patreon_content_sync.php` file:

- move the lines 168:172 to line 203 (handle images after post has been inserted)
- add `$inserted_post_id` as 3rd parameter to `$this->check_replace_patreon_images_with_local_images`

---

_[View the full topic](https://www.patreondevelopers.com/t/wordpress-post-sync-import-not-working/3327)._
