• Resolved HosseinRafiei

    (@hosseinrafiei)


    Hi,

    Thanks for releasing a major update for this plugin.
    As I informed you earlier, I have a plugin with more than 5K active installs and I made my plugin compatible with your plugin to handle cloning child websites.

    I have some function that run after the clone process to clone data of my own plugin but it seems in the version of your plugin the following hook is removed.

    ns_cloner_after_everything

    Please let me know how can I run my own codes in this version?
    I need to get source ID and new blog ID as well.

    Also please let me know is there a way to detect if we’re in a clone process in a function registered for wpmu_new_blog hook? I need to run different code when we’re in clone process.

    Looks forward to hear back from you soon since my clients are complaining about the incompatibilities that are created after NS cloner version 4.

Viewing 1 replies (of 1 total)
  • Plugin Author Never Settle

    (@neversettle)

    Hi @hosseinrafiei

    The new action is called ns_cloner_process_finish:

    add_action( 'ns_cloner_process_finish', function(){
        $source_id = ns_cloner_request()->get( 'source_id' ),
        $target_id = ns_cloner_request()->get( 'target_id' ),
        // do your custom actions here
    });

    Regarding detecting a clone process, you should be able to check for the constant DOING_CLONING like:

    if ( defined( 'DOING_CLONING' ) && DOING_CLONING ) {
       // handle clone only actions here
    }
Viewing 1 replies (of 1 total)
  • The topic ‘ns_cloner_after_everything Hook?!’ is closed to new replies.