Title: Variable plugin setting when cloning?
Last modified: August 22, 2016

---

# Variable plugin setting when cloning?

 *  Resolved [kitarak](https://wordpress.org/support/users/kitarak/)
 * (@kitarak)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/variable-plugin-setting-when-cloning/)
 * Hey guys,
 * Looks like a great plugin! I’m wanting to clone sites, but one plugin in particular
   will need a variable setting, which will be given at the time site is cloned…
   is there a particular hook I can/should use within your plugin to have it read
   this variable as it populates plugin settings on the new site?
 * Thanks very much for any help you can provide.
 * [https://wordpress.org/plugins/ns-cloner-site-copier/](https://wordpress.org/plugins/ns-cloner-site-copier/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Never Settle](https://wordpress.org/support/users/neversettle/)
 * (@neversettle)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/variable-plugin-setting-when-cloning/#post-5953080)
 * Thanks Kitarak.
 * Probably the best hook to use would be the action called “ns_cloner_after_clone_tables”.
   An rough example to get you started:
 *     ```
       add_action( 'ns_cloner_after_clone_tables', 'kitarak_custom' );
       function kitarak_custom(){
           global $ns_cloner;
           update_site_option( $ns_cloner->target_id, 'option_name', 'new_option_value' );
       }
       ```
   
 * Feel free to reopen this thread and ask if you have any further questions!
 *  Thread Starter [kitarak](https://wordpress.org/support/users/kitarak/)
 * (@kitarak)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/variable-plugin-setting-when-cloning/#post-5953172)
 * This worked perfectly. Thank you!
 *  Plugin Author [Never Settle](https://wordpress.org/support/users/neversettle/)
 * (@neversettle)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/variable-plugin-setting-when-cloning/#post-5953185)
 * You’re welcome! Glad we could help.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Variable plugin setting when cloning?’ is closed to new replies.

 * ![](https://ps.w.org/ns-cloner-site-copier/assets/icon-256x256.gif?rev=2323308)
 * [NS Cloner - Site Copier](https://wordpress.org/plugins/ns-cloner-site-copier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ns-cloner-site-copier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ns-cloner-site-copier/)
 * [Active Topics](https://wordpress.org/support/plugin/ns-cloner-site-copier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ns-cloner-site-copier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ns-cloner-site-copier/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Never Settle](https://wordpress.org/support/users/neversettle/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/variable-plugin-setting-when-cloning/#post-5953185)
 * Status: resolved