• Resolved cochii

    (@cochii)


    Hi

    During post imports, I can import a category. In the csv file, I have a “customcategory” column.
    During the import, if there are already categories on the post, I will want to delete them and add the one from my column
    I tried to do this in pmxi_saved_post but the taxonomy have already been changed
    In pmxi_single_category I don’t have the post id.
    How to retrieve the customcategories of the current post and if they do not match the import category, delete them from the post and add the new one please ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @cochii,

    How to retrieve the customcategories of the current post and if they do not match the import category, delete them from the post and add the new one please ?

    As long as “Update all data” or “Remove existing taxonomies, add new taxonomies” is enabled in the Import Settings, it should be removing the old terms from the post and then assigning the ones from the import template (without any custom code needed).

    If that’s not happening, please replicate the issue on a debug site at http://www.wpallimport.com/debug/ and open a support request at http://www.wpallimport.com/support/ with the details.

    Thread Starter cochii

    (@cochii)

    Hi @wpallimport
    thank you for the answer
    I have a problem on the other hand, because during my import, I edit several taxonomies, one of them is hierarchical and can have several … How can I put the option “Remove existing taxonomies, add new taxonomies” only on a precise taxonomy?

    Plugin Author WP All Import

    (@wpallimport)

    Hi @cochii,

    How can I put the option “Remove existing taxonomies, add new taxonomies” only on a precise taxonomy?

    You can use the “Update only these taxonomies, leave the rest alone” setting and type in the taxonomies you want to update.

    Plugin Author WP All Import

    (@wpallimport)

    Hi @cochii,

    I’m marking this as resolved since we haven’t heard back in a while. You can follow up in this thread if you still have questions.

    Anyone else, please start a new topic.

    This bug still exists.

    To reproduce it, follow your steps posted;

    ‘As long as “Update all data” or “Remove existing taxonomies, add new taxonomies” is enabled in the Import Settings, it should be removing the old terms from the post and then assigning the ones from the import template (without any custom code needed).’

    I’ll note I’m also using the ACF add-on to manage taxonomies.

    What’s happening is that when the taxonomy term is no longer present in the CSV, it does not remove it.

    1. Import a CSV that parses a custom taxonomy terms based on a “;” (semi-colon)
    2. Visit the item for the newly added custom post type, and confirm terms imported
    3. Updated the CSV removing all terms for the given taxonomy
    4. Upload the updated CSV
    5. Re-run importer

    You’ll see that even with the option “Remove existing taxonomies, add new taxonomies”, its not removing all terms.

    FWIW, we’ve come across various issues with this plugin, I am grateful it is actively being worked on.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘When update taxonomy terms, delete old’ is closed to new replies.