| @@ -180,8 +180,10 @@ | ||
| 180 | 180 | try { |
| 181 | 181 | # Perform import |
| 182 | 182 | $result = $this->importer->import_from_plugin($plugin); |
| 183 | 183 | |
| 184 | + Metasync_PostHog::import_batch($plugin, 'redirections', $result); | |
| 185 | + | |
| 184 | 186 | if ($result['success']) { |
| 185 | 187 | wp_send_json_success($result); |
| 186 | 188 | } else { |
| 187 | 189 | wp_send_json_error($result); |
| @@ -222,8 +224,10 @@ | ||
| 222 | 224 | wp_send_json_error(['message' => 'The CSV file is too large. Maximum size is 2 MB.']); |
| 223 | 225 | } |
| 224 | 226 | |
| 225 | 227 | $result = $this->importer->import_csv_file($file['tmp_name']); |
| 228 | + | |
| 229 | + Metasync_PostHog::import_batch('csv', 'redirections', $result); | |
| 226 | 230 | |
| 227 | 231 | if (!empty($result['success'])) { |
| 228 | 232 | wp_send_json_success($result); |
| 229 | 233 | } else { |