Viewing 3 replies - 1 through 3 (of 3 total)
  • First of all, you should know that I am not a professional.

    Let’s say I have an installation and ID:5 will be loaded again and want to be included in ID:5.

    The shortest way to do this is to set ID:6 to ID:5 in the “wp_pmxi_imports” table in the mysql database. In this way, the new installation will be done as ID:5.

    Note: Make sure to create a backup beforehand.

    @bsmolyanov I haven’t tested this yet, but this may do the trick:

    function after_xml_import($import_id, $import)
    {
        switch ($import_id) {
            case 1:
                wp_remote_get('import2URL'); //replace with your import URL
                break;
            case 2:
                wp_remote_get('import3URL'); //replace with your import URL
                break;
        }
    }
    
    add_action('pmxi_after_xml_import', 'after_xml_import', 10, 2);

    I also found this similar/cleaner solution for chaining cron jobs on the WPAllImport GitHub https://github.com/trey8611/wpiedocs/issues/2

    Hope this helped!

    • This reply was modified 2 years, 9 months ago by Aakash.
    • This reply was modified 2 years, 9 months ago by Aakash.
    • This reply was modified 2 years, 9 months ago by Aakash.
    Plugin Author WP All Import

    (@wpallimport)

    Hi @bsmolyanov,

    The workaround at https://www.wpallimport.com/documentation/developers/code-snippets/#trigger-the-next-import-on-completion-of-an-import is what you’re looking for, you just need to add “else if” statements in the function to cover multiple import IDs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Run Multiple Different Imports – one after another’ is closed to new replies.