Forums › Forums › Search & Filter Pro › Products disappearing from Filters
- This topic has 27 replies, 3 voices, and was last updated 4 years, 7 months ago by
Ross.
-
Trevor(Private) October 8, 2020 at 11:59 am #262409
You are using WP All Import Pro. When you use that, it does not inform WordPress (and consequently our plugin) that a post has been changed/created/deleted.
You need an additional function added to the child theme functions.php file:
add_action('pmxi_saved_post', 'wp_all_import_post_saved', 1000, 1); function wp_all_import_post_saved($id) { do_action('search_filter_update_post_cache', $id); }
This is so our cache rebuilds (just for the affected post) after each post is imported. This is the equivalent of editing a post manually and clicking the ‘Update’ button, but much faster.
Trevor(Private) October 15, 2020 at 5:10 pm #263030If ‘Update’ is being pressed in the product editor page, our cache should be updated. The only time that might not appear to work is if your server caches database writes to do ‘later’. What then would happen is you would press ‘Update’, and our plugin would immediately update the cache for that product, but at this point find no changes, and then your server might update the database, but our plugin would not know this has happened. Then, if you hit update again, having made no changes, and our plugin would rebuild that product’s cache again, this time finding the changes, from the previous delayed save.
We have seen this type of issue before, but server configuration is not our field of expertise, so we can only think something like this is happening.
Trevor(Private) October 15, 2020 at 8:58 pm #263066It doesn’t work like that, no. When WordPress ‘updates’ a post, it sends a general notification to any listening application (like our plugin). It does this per post updated. Our plugin acts immediately.
If you install query monitor (the plugin), you can see what happens when you update a post. You will see our plugin jump into action. But, if the actual data hasn’t really been saved to the database tables at that point …
-
AuthorPosts