Forums Forums Search & Filter Pro Wp all import – taxonomies not updated

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #169773

    Hi!

    I have searched through your support forum and it seems that others are also experiencing the same issue as me, however, their posts are one year old, so I just want to see if you have come up with a new solution.

    I am importing products via Wp All Import.
    When I import products and their taxonomies, the right taxonomies are assigned to the right products, but you cannot see this on the front-end. However, if you go to the product/post and update it manually without touching anything but the update button, the taxonomy will show on the front-end.
    Can you help me out? is it still an issue with the update of the cache?

    // Jannik

    Trevor
    #169883

    You would, I think, need to make sure you are using a child theme (Orbisius have a simple, free plugin to make one of these from your theme). In the child theme functions.php, you would require 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);
    }

    Please test this and see if it works for you?

    Anonymous
    #169911

    Hi Trevor!
    Thanks for your reply. It does not seem to work though, the problem still persists.

    Best regards
    Jannik

    Anonymous
    #169917

    It is a custom post type i have though, so maybe i will need to tweak it the following way?

    <?php
    add_action(‘pmxi_saved_post’, ‘post_saved’, 10, 1);

    function post_saved($id) {
    $x = get_post_meta($id, ‘your_meta_key’, true);
    // do something with $x
    update_post_meta($id, ‘your_meta_key’, $x);
    }

    ?>

    Anonymous
    #169919

    As seen here.

    Trevor
    #169921

    This will only fix newly updated posts, not ones already imported. Are you saying it does not work for newly imported data? I know it has worked in the past, as another user has used the same code, which is based on a code sample in the WP All Import developer API guide.

    Trevor
    #169928

    It should not matter that it is a custom post type. The Post ID is what matters. That code refers to custom field data.

    Anonymous
    #169938

    Hi again Trevor!
    Thank you again for your help, i really do appreciate it!

    I just tested it again, and it works in this way:
    When I import NEW products via Wp All Import, the taxonomies are not going to be attached before I manually push update/publish on the individual post. HOWEVER, if i run the Wp All Import again, all the products which are already in the system are getting their taxonomy assigned in the right way, and it can now be seen on the front-end. You could say, that it is a workaround, but it is not the best way to have a Wp all Import run twice every time. Do you have any idea how to make it work for new products and not only existing products?

    Best regards

    Trevor
    #169997

    You can see their documentation here:

    http://www.wpallimport.com/documentation/advanced/action-reference/

    If you added an echo to the function, to echo the post ID to the screen, like this:

    echo '<div><p>Post #' . $ID . ' processed</p></div>';

    on a new line after the do_action, you would see if the function is being triggered correctly.

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