Hi,
Thanks for your inputs. I thought it to be a bug, so reported it. Anyways, I fixed this issue by following piece of code. I guess this should work as well or would have any other issues I’m unware of.
add_action('ns_cloner_process_exit','fix_ns_cloner_path_fuction');
function fix_ns_cloner_path_fuction() {
/**
* Get the request details.
*/
$request = ns_cloner_request()->get_request();
/**
* Get the path and new store ID.
*/
$directory = $request['target_upload_dir_relative'];
$new_site_id = $request['target_id'];
/**
* Switch to blog and update id
*/
switch_to_blog($new_site_id);
update_option('upload_path',$directory);
restore_current_blog();
return;
}