Forums Forums Search & Filter Pro Auto update Search and Filter cache after import with WP All Import

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #216362

    Hi,

    We import WooCommerce Products with WP All Import. We’d like to auto update the new created posts for the Search & Filter cache.

    We found this bit of code:

    
    add_action('pmxi_saved_post', 'wp_all_import_post_saved', 10, 1);
    function wp_all_import_post_saved($id) {
        do_action('search_filter_update_post_cache', $id);
    }
    

    But it doesnt seem te work. Do you have any ideas why this could happen?

    Cheers, Emma

    Trevor
    #216396
    This reply has been marked as private.
    Anonymous
    #216405

    Thanks for your reply.
    We can check if it works once we have a new import. We’ll let you know.

    Trevor
    #216409

    OK. I look forward to hearing from you.

    Anonymous
    #216843

    Hi,

    We have just imported a new file and the newly created products do show up automatically in the results page, as expected!

    But filter values aren’t updated automatically and if you filter the new products aren’t in those results.

    Do you know how we can fix this?

    Trevor
    #216845
    This reply has been marked as private.
    Ross Moderator
    #217135

    Hi Emma

    Where did you place this code?

    add_action('pmxi_saved_post', 'wp_all_import_post_saved', 10, 1);
    function wp_all_import_post_saved($id) {
        do_action('search_filter_update_post_cache', $id);
    }

    You need to add it to functions.php, I believe there is also a place where you can add this inside the WP All Import plugin, but if my memory serves, this did not work.

    We’ve had a couple of users with the same issue as you, however, with the beta, their issues are resolved. So I would like to be doubly ensure (you may already have) that you have disabled any caching plugins (and you have been clearing your browser cache) while we test this issue?

    Thanks

    Ross Moderator
    #217137

    Also, you could try with lowering the priority on the action (notice instead of 10 we can try 1000):

    add_action('pmxi_saved_post', 'wp_all_import_post_saved', 1000, 1);

Viewing 8 posts - 1 through 8 (of 8 total)