add_action('pmxe_after_export','wpae_save_export_to_server_folder',10,2);function wpae_save_export_to_server_folder($export_id,$exportObj){//OPTIONAL:Limit this execution to a specific export ID (e.g.,Export ID 5)//if ($export_id !=5) return;//Get the absolute path of the newly generated export file $export_file_path=$exportObj->get_attached_file();if (empty($export_file_path) || !file_exists($export_file_path)){return}//Define your custom destination directory on the server $target_dir=WP_CONTENT_DIR . '/uploads/my-exports/';//Create the directory if it does not exist if (!file_exists($target_dir)){mkdir($target_dir,755,true)}//Determine the destination filename $file_name=basename($export_file_path);$destination=$target_dir . $file_name;//Copy the file to the new location on your server copy($export_file_path,$destination);}